Adding a vendor component to the build process

Hi,

we’re trying to add a component to the Brave build, in the same manner as say ad-block and tracking-protection components, in other words something mounted in /src/brave/vendor.

Now we’ve added the required entry in the DEPS file as well as .gclient_entries, and the sync -- init commmand pulls the component to the expected place. However we can’t seem to get gn to pickup the component even tough a BUILD.gn files exists.

Wondering if there is something obvious we’re missing or if there is another place we need to add the component to in order for it to be picked up at build time.

We’re still in very early stages of getting this in, so the BUILD.gn does not really do much, and the interfaces that should be exposed are not yet defined.

Thanks

Perhaps you can share what you can about the code you have changed?

For sure, I’m still reluctant to make a PR, the changes are trivial at this point. We have added

"vendor/challenge-bypass-extension": "https://github.com/privacypass/challenge-bypass-extension.git@a3eab4e5687f8d09ffcf206c281df739fb75e0de",

to brave-core/DEPS at line 23. Also shimmed in

src/brave/vendor/challenge-bypass-extension': 'https://github.com/privacypass/challenge-bypass-extension.git@a3eab4e5687f8d09ffcf206c281df739fb75e0de'

at the end of .gclient_entries files (that one gets generated).

Here is also a link to the BUILD.gn file in our aspiring component branch.

You just need to add to deps on one of the other build files to your group in your BUILD.gn. Where? It depending on which process and what you want it to be a part of.

Thank you @brian, this was exactly what I needed, figured it out :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.