aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp
Commit message (Collapse)AuthorAge
* Autoconfigure MSVC CROSSTOOLGravatar Yun Peng2016-07-13
| | | | | | | -- Change-Id: I55b2c567a3fc6be15f29d03c5c6e9891ef540072 Reviewed-on: https://bazel-review.googlesource.com/#/c/4012 MOS_MIGRATED_REVID=127184463
* Remove hacks of building dll from msvc_link.pyGravatar Yun Peng2016-07-01
| | | | | | | -- Change-Id: I53ec66581c59d4bba8460fb3e5d20258ea36d0f1 Reviewed-on: https://bazel-review.googlesource.com/#/c/3940 MOS_MIGRATED_REVID=126306276
* Make building dll less a hack on WindowsGravatar Yun Peng2016-07-01
| | | | | | | | | | | | | | | | | | | | Add .dll as a shared library type like .so If we have target: cc_binary( name = "bar.dll", srcs = ["bar.cc"], linkshared = 1, ) Now we can build a dll using bazel build //foo:bar.dll If the target name is still bar.so, the wrapper script also build the dll by copying the output file to bar.dll. -- Change-Id: Ie3d1fb83965ddf691d0cc4734a61a0b0ce89d948 Reviewed-on: https://bazel-review.googlesource.com/#/c/3931 MOS_MIGRATED_REVID=126301390
* Adding features to MSVC CROSSTOOLGravatar Yun Peng2016-07-01
| | | | | | | | | | | | This stops Bazel from passing some of the gcc options to wrapper script. Options we get rid of: -c -o -MD -MF -frandom-seed -isystem -iquote -I -- Change-Id: I416b393c6875a2033d5382a644471c416cd5e8d1 Reviewed-on: https://bazel-review.googlesource.com/#/c/3930 MOS_MIGRATED_REVID=126299789
* Rollback of commit bda8ae9212621da50d6b18f185f99450fb6d6da9.Gravatar Lukacs Berki2016-06-06
| | | | | | | | | | | | | | | *** Reason for rollback *** Cannot be built with currently released Bazel. *** Original change description *** Remove redirect chasing from AndroidConfiguration.Loader. With aliases, it's not necessary anymore. -- MOS_MIGRATED_REVID=124123904
* Use alias instead of a filegroup for the //tools/cpp:toolchain entry point ↵Gravatar Lukacs Berki2016-06-06
| | | | | | | for the C++ toolchain. -- MOS_MIGRATED_REVID=124111346
* Make cpp tests refer to docker runfiles at the right pathGravatar Kristina Chodorow2016-05-31
| | | | | | | Fixes #1316. -- MOS_MIGRATED_REVID=123655074
* cc_configure: removes -no-canonical-prefixes from the list of default flagsGravatar Damien Martin-Guillerez2016-05-31
| | | | | | | | | | | | | This might causes problem in a future remote execution services but in that kind of service it would make more sense to not use the auto-configured C++ toolchain. Tested with bazel test //tools/cpp/test:* Fixes #1204. -- MOS_MIGRATED_REVID=123643630
* Add -headerpad_max_install_names to darwin CROSSTOOL linker flags.Gravatar David Chen2016-05-17
| | | | | | | Fixes #1269 -- MOS_MIGRATED_REVID=122502116
* cc_configure: correctly detect 32/64 bits CPU for LinuxGravatar Damien Martin-Guillerez2016-05-11
| | | | | | | | | It is now consistent with CPU.java Fixes #1251. -- MOS_MIGRATED_REVID=122036487
* MSVC toolchain changes for building TensorFlowGravatar Yun Peng2016-05-10
| | | | | | | -- Change-Id: If41817e3889f118a849a29cfb03ac0f7e07d5557 Reviewed-on: https://bazel-review.googlesource.com/#/c/3582 MOS_MIGRATED_REVID=121924420
* cc_configure: use the wrapper only if on Darwin and ship the environment ↵Gravatar Damien Martin-Guillerez2016-05-09
| | | | | | | | | | | | | | | | only if in homebrew This will fix the sandboxing issues for rules_rust and rules_go while still allowing to build inside homebrew. Should unblock #1238 Fixes bazelbuild/rules_go#20. Fixes bazelbuild/rules_rust#4. Tested under homebrew + classic tests. -- MOS_MIGRATED_REVID=121834186
* Rollback of commit 5e6218ea4e83a7fadfe54c35488781da550ce13e.Gravatar Damien Martin-Guillerez2016-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll-forward with fix: - Previous test did let the all_files group with the wrapper script, and it got removed when creating the actual change. Added it back Tested with `./compile.sh determinism` *** Original change description *** Automated [] rollback of commit 87a58589d6770a6e9a0f998274bfe69f1feb6014. *** Reason for rollback *** The sandbox fix did not fix. More work is needed. Fixes #1239 *** Original change description *** Automated [] rollback of commit b4549fe8dfb29f87fd37b38bf21a5b4bef818b12. *** Reason for rollback *** Rollforward with fixes: - Quote single-quote in the environment exports - Exclude the following environment variables: _ and dotted names - Add the wrapper to the dependency of the crosstool chain so it gets shipped to the sandbox. Hopefu... -- MOS_MIGRATED_REVID=121667505
* Rollback of commit 87a58589d6770a6e9a0f998274bfe69f1feb6014.Gravatar Damien Martin-Guillerez2016-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** The sandbox fix did not fix. More work is needed. Fixes #1239 *** Original change description *** Automated [] rollback of commit b4549fe8dfb29f87fd37b38bf21a5b4bef818b12. *** Reason for rollback *** Rollforward with fixes: - Quote single-quote in the environment exports - Exclude the following environment variables: _ and dotted names - Add the wrapper to the dependency of the crosstool chain so it gets shipped to the sandbox. Hopefully after that we can cut a new release and have a homebrew package again #1177. *** Original change description *** Automated [] rollback of commit f1f24fc4b5aa83b7a4b872ec8f1c3a369799c081. *** Reason... *** -- MOS_MIGRATED_REVID=121665313
* Rollback of commit b4549fe8dfb29f87fd37b38bf21a5b4bef818b12.Gravatar Damien Martin-Guillerez2016-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes: - Quote single-quote in the environment exports - Exclude the following environment variables: _ and dotted names - Add the wrapper to the dependency of the crosstool chain so it gets shipped to the sandbox. Hopefully after that we can cut a new release and have a homebrew package again #1177. *** Original change description *** Automated [] rollback of commit f1f24fc4b5aa83b7a4b872ec8f1c3a369799c081. *** Reason for rollback *** Broke ci.bazel.io See #1231. *** Original change description *** Ship the environment fixed at configure time to the C++ compiler Use a wrapper script on all platform to ship the environment to the C++ compiler. This should enable building with Homebrew special setup and will likely reduce the number of hard corner cases to solve. Should... *** -- MOS_MIGRATED_REVID=121497195
* Rollback of commit f1f24fc4b5aa83b7a4b872ec8f1c3a369799c081.Gravatar Damien Martin-Guillerez2016-05-04
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke ci.bazel.io See #1231. *** Original change description *** Ship the environment fixed at configure time to the C++ compiler Use a wrapper script on all platform to ship the environment to the C++ compiler. This should enable building with Homebrew special setup and will likely reduce the number of hard corner cases to solve. Should unblock #1177. -- MOS_MIGRATED_REVID=121468271
* Ship the environment fixed at configure time to the C++ compilerGravatar Damien Martin-Guillerez2016-05-04
| | | | | | | | | | | | | | Use a wrapper script on all platform to ship the environment to the C++ compiler. This should enable building with Homebrew special setup and will likely reduce the number of hard corner cases to solve. Should unblock #1177. -- Change-Id: I36f09edaf131f65c730bdd626ce521478ff587c7 Reviewed-on: https://bazel-review.googlesource.com/3560 MOS_MIGRATED_REVID=121462120
* Adds the compiler to the key for selecting the cc_toolchain label inGravatar Alex Humesky2016-05-04
| | | | | | | | | | | cc_toolchain_suite. This will allow selecting the correct toolchain based on --compiler / --android_compiler. RELNOTES: The key for the map to cc_toolchain_suite.toolchains is now a string of the form "cpu|compiler" (previously, it was just "cpu"). -- MOS_MIGRATED_REVID=121418076
* cc_configure: add -lm to the default linker flagsGravatar Damien Martin-Guillerez2016-04-28
| | | | | | | | | | | | | | Some C++ toolchain requires -lm when passing -lstdc++. Always add it. We should probably make that depend on what kind of binary we actually want to build but that's beyond the scope of cc_configure. Fixes #1190. -- MOS_MIGRATED_REVID=121015578
* cc_configure: do not assume the message from gcc is in EnglishGravatar Damien Martin-Guillerez2016-04-28
| | | | | | | Fixes #1204. -- MOS_MIGRATED_REVID=120997826
* cc_configure.bzl: support spaces in CC environmentGravatar Damien Martin-Guillerez2016-04-27
| | | | | | | Also support CC to be empty and fallback to gcc. -- MOS_MIGRATED_REVID=120907744
* cc_configure.bzl: Add -Wl,-no-as-needed as default link optionsGravatar Damien Martin-Guillerez2016-04-26
| | | | | -- MOS_MIGRATED_REVID=120791766
* Enable msvc toolchain to support params fileGravatar Yun Peng2016-04-25
| | | | | | | | | Also fixed a small bug -- Change-Id: I22fa16272587471b9652f3b7f7d9cb1341fc6524 Reviewed-on: https://bazel-review.googlesource.com/#/c/3464 MOS_MIGRATED_REVID=120703703
* cc_configure: Add -B to compiler flag tooGravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | On some target platform gcc invokes external tools during compilation, see #1152. Also support absolute path when looking for gcc. This needs to be cherry-picked to fix #1177. -- MOS_MIGRATED_REVID=120581887
* Prevent msvc toolchain's python wrapper script from generating pyc filesGravatar Yun Peng2016-04-20
| | | | | | | | Otherwise, we have to clean it every time and it will affect the linking in cc_configure.bzl -- MOS_MIGRATED_REVID=120329223
* cc_configure.bzl: strip end of line when looking for the cpuGravatar Damien Martin-Guillerez2016-04-20
| | | | | | | As noticed in #1122. -- MOS_MIGRATED_REVID=120315240
* Added configuration for wrapper scripts of msvc toolchainGravatar Yun Peng2016-04-20
| | | | | | | | | Now we only need to specify --cpu=x64_windows_msvc when using msvc toolchain -- Change-Id: Id501dd9ef2fd6553285677605ec75e80499b9ef7 Reviewed-on: https://bazel-review.googlesource.com/#/c/3441 MOS_MIGRATED_REVID=120260588
* cc_configure: uses which on the CC environment variableGravatar Damien Martin-Guillerez2016-04-20
| | | | | | | | | It's wrong to assume it points to an absolute path. Discovered in issue #1152. -- MOS_MIGRATED_REVID=120242469
* cc_configure: Add piii to the list of supported cpu_valueGravatar Damien Martin-Guillerez2016-04-19
| | | | | | | Fixes #1122. -- MOS_MIGRATED_REVID=120223970
* cc_configure: always add -B/usr/bin to the list of gcc optionGravatar Damien Martin-Guillerez2016-04-19
| | | | | | | Fixes #760. -- MOS_MIGRATED_REVID=120217217
* Fix cc_configure include path for Frameworks on OS X.Gravatar Damien Martin-Guillerez2016-04-19
| | | | | | | | | | | | cc_configure assumed the paths returned by $(CC) -E -xc++ -v where not containing any extra information but clang on OS X adds " (framework directory)" for path from Frameworks. This change strip this out. -- Change-Id: I90617e825100f86a1f0991e128755802da2c7afd Reviewed-on: https://bazel-review.googlesource.com/3389 MOS_MIGRATED_REVID=120210800
* Refactor wrapper script msvc_tools.py to make path configure easilerGravatar Yun Peng2016-04-12
| | | | | | | | | Also fixed a small bug. -- Change-Id: I05dab2f4a5d6216f2972b0cd2cb62506f5b1cb06 Reviewed-on: https://bazel-review.googlesource.com/#/c/3326/ MOS_MIGRATED_REVID=119529809
* Allow params files on Windows.Gravatar Lukacs Berki2016-04-08
| | | | | | | Windows currently means msys2, and the tools there do support params files, and BoringSSL cannot be compiled without them because command lines are too long. -- MOS_MIGRATED_REVID=119360154
* Add msvc crosstool definitonGravatar Yun Peng2016-04-07
| | | | | | | | | | | | This patch add the msvc crosstool definiton to CROSSTOOL file and BUILD file. Two paths are expected to exist: for msvc: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/ for windows sdk: C:/Program Files (x86)/Windows Kits/10/ -- Change-Id: I2b21e566a588459f9fef767c5dc9dab1565d1ae8 Reviewed-on: https://bazel-review.googlesource.com/#/c/3266 MOS_MIGRATED_REVID=119276027
* Add the wrapper script for msvc crosstoolGravatar Yun Peng2016-04-07
| | | | | | | | | | Using batch script to invoke real wrapper script written in python The default python path is expected to be C:/python_27_amd64/files/python.exe -- Change-Id: If47bf668ce4af2b6d28a1852189c061480816833 Reviewed-on: https://bazel-review.googlesource.com/#/c/3265 MOS_MIGRATED_REVID=119275909
* Fix issues with cc_configureGravatar Alpha Lam2016-04-01
| | | | | | | | | | | | | | Fixing a few issues with cc_configure that I encountered. * The argument for rpath should be -Wl,-rpath. * cc_configure should consider CPLUS_INCLUDE_PATH. I ran into this problem when using a crosstool gcc which needs -I/usr/include. * Check if -Wunused-but-set-parameter is available. -- Change-Id: I73198b5b17674ecbf1b511e23fcc9331ca96c8e0 Reviewed-on: https://bazel-review.googlesource.com/#/c/3210/ MOS_MIGRATED_REVID=118763218
* cc_configure.bzl: fix path to static crosstoolGravatar Damien Martin-Guillerez2016-03-31
| | | | | | | | | | | | | | | | Static crosstool where copied in the wrong path, leading to not found package and breaking the Windows build. Also the BUILD.bazel file contains now a reference to @cc_configure// package, so we need another copy. Tested: manually patched the change on the Windows slave and ran ./compile.sh Fixes #1101. -- MOS_MIGRATED_REVID=118674922
* Make C++ autoconfigured toolchain the default for Linux and OS X.Gravatar Damien Martin-Guillerez2016-03-31
| | | | | | | This is done by adding a default workspace suffix. -- MOS_MIGRATED_REVID=118656979
* Adds Skylark Remote Repository documentationGravatar Damien Martin-Guillerez2016-03-24
| | | | | | | Fixes #1043 -- MOS_MIGRATED_REVID=118039426
* cc_configure: Fix fallout of renaming ctx to repository_ctx.Gravatar Damien Martin-Guillerez2016-03-18
| | | | | -- MOS_MIGRATED_REVID=117478721
* cc_configure: fallback to static crosstool for unsupported platformGravatar Damien Martin-Guillerez2016-03-15
| | | | | -- MOS_MIGRATED_REVID=117258091
* Use repository_ctx for each usage of repository context.Gravatar Damien Martin-Guillerez2016-03-14
| | | | | | | | This will avoid confusion with the normal Skylark rule context. Also fixed indentation of cc_configure.bzl -- MOS_MIGRATED_REVID=117011107
* cc_configure: fix issues with CentOS 6.7 and custom gccGravatar Damien Martin-Guillerez2016-03-08
| | | | | | | This setup was provided on issue #760. -- MOS_MIGRATED_REVID=116656431
* Set tools/cpp/test tests to exclusiveGravatar Damien Martin-Guillerez2016-03-08
| | | | | | | | These tests require exclusive access to the docker daemon or they sometime fails due to concurrency. -- MOS_MIGRATED_REVID=116653582
* cc_configure: fix various small errorsGravatar Damien Martin-Guillerez2016-03-04
| | | | | | | | | | | - Skylark does not allow implicit concatenation that was added by the linter - osx_cc_wrapper renaming was not applied everywhere - arm toolchain was missing in the toolchain_suite Also fix the test to use the correct cc_configure.bzl file. -- MOS_MIGRATED_REVID=116362768
* Tests for tools/cpp:cc_configure.bzlGravatar Damien Martin-Guillerez2016-03-03
| | | | | | | | | | | | | They test ./compile.sh under various configuration using Docker. Because we miss several stuff from our docker support (docker_pull and docker_test), those test are highly unhermetic. This only includes tests for a few OS. We will add tests for specific use case on-demand. -- MOS_MIGRATED_REVID=116197057
* Add a cc_configure rule to auto-configure C++ crosstoolGravatar Damien Martin-Guillerez2016-03-02
| | | | | | | | | | This is the last step of http://goo.gl/fD4ZsY (issue #893). Tests are in a separate change because they requires pretty complex setup. -- MOS_MIGRATED_REVID=116141979
* Use bind to redirect C++ crosstool configurationGravatar Damien Martin-Guillerez2016-03-02
| | | | | | | | This is a temporary workaround to enable the use of a cc_configure() rules to auto-configure C++ toolchain. -- MOS_MIGRATED_REVID=116140726
* Change the path of gcc for Windows to c:\tools\msys64 , because that's where ↵Gravatar Lukacs Berki2016-02-24
| | | | | | | | | Chocolatey installs msys2. This is only a temporary hack to get our continuous build up and running, because we can't assume that everyone will install their C++ compiler there. But then again, msys2 is not a very useful target for Windows, so maybe we should fix that first. -- MOS_MIGRATED_REVID=115449817
* Add supportsDynamicLinker to CppConfigurationGravatar Googler2016-02-09
| | | | | | | | | Rather than a new protobuf field, this enabling flag is presence of a section with DYNAMIC linking mode in the CROSSTOOL file, whether or not it needs to specify any linker flags. RELNOTES[NEW]: Better support for toolchains that don't have a dynamic linker. -- MOS_MIGRATED_REVID=114110200