Closed sayrer closed 7 years ago
In order to use this, in let's say cpp-base for simplicity, would we need to run the WORKSPACE
generation, copy those values over to cpp-base's WORKSPACE file, refer to this repo as a repository and then build? Or do we copy in the tools
as we were doing previously and refer to it that way (that would solve the BUILD paths issues I am seeing when referring to it as a local_repository
).
I was thinking it would be a remote repository, with the WORKSPACE copied.
Bazel is adding transitive WORKSPACE files soon. https://github.com/bazelbuild/bazel/issues/1943
I didn't intend to require running the generator script. I wrote that so a cron job can tag each Chromium stable release.
I got this to work in cpp-base's WORKSPACE this way (it built, but didn't link, smaller issue).
git_repository( name = 'co_vsco_bazel_toolchains', remote = 'https://github.com/vsco/bazel-toolchains', commit = '2e97881e72e911c74a722c700516aeaf74007c35', )
load("@co_vsco_bazel_toolchains//toolchains:repositories.bzl", "bazel_toolchains_repositories") bazel_toolchains_repositories()
and then running:
bazel test --crosstool_top=@co_vsco_bazel_toolchains//tools/cpp:default-toolchain //statsd/...
Thanks for the updates, I was able to get parts of cpp
building as well using the above, just running into the linker issues mentioned above. Are they specific to OSX linking only?
After removing the health-check code from cpp
and building via
bazel build --cxxopt="-std=c++11" -c opt --crosstool_top=@co_vsco_bazel_toolchains//tools/cpp:default-toolchain //prediction-api:vsco_prediction_server
Was able to successfully build prediction-api on OSX! :tada: :tada: :tada: :tada:
https://travis-ci.com/vsco/bazel-toolchains/builds/50882186
Still some cleanup to do:
not sure I'm getting a clean link on linux (should be using the sysroot on the link line).give scripts/generate_workspace.py an arg parsergo through the visibility rules under tools/ (they are all public rn)