aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp
Commit message (Collapse)AuthorAge
* cc_configure.bzl: Using registry information to find VSGravatar Yun Peng2016-11-28
| | | | | | | | | | | | | This change will find the latest installed VS by using reg.exe Also it gets rid of bash dependency in cc_configure.bzl Fix https://github.com/bazelbuild/bazel/issues/2100 -- Change-Id: I341e89b0d3ee76c39ea69d0e29904a0936d48338 Reviewed-on: https://cr.bazel.build/7533 MOS_MIGRATED_REVID=140201887
* Make //tols/cpp/test start from the distribution artifactGravatar Klaus Aehlig2016-11-24
| | | | | | | | | | | | | The docker tests in //tools/cpp/test still assume that the sources are enough to just compile.sh to bootstrap a bazel binary. Fix this, by using the distribution archive instead. While there, also add a target for the distribution archive as tar. -- Change-Id: Ic31bb95da0165f83a14537a1719c27e5067d0d65 Reviewed-on: https://cr.bazel.build/7531 MOS_MIGRATED_REVID=140134322
* Change handling of LD_LIBRARY_PATH in link actions: instead of passing the ↵Gravatar Lukacs T. Berki2016-11-24
| | | | | | | | | | | directories using a linker option, pass it in the environment instead. Fixes #2099. -- Change-Id: I9bff1888fbb211bc0853a68065b3098c4908c3d9 Reviewed-on: https://cr.bazel.build/7530 MOS_MIGRATED_REVID=140133329
* cc_configure.bzl: On Windows, make sure C:\windows\system32 is in PATHGravatar Yun Peng2016-11-24
| | | | | | | | | | | This change makes VCVARSALL.BAT work even with truncated path. Fixed https://github.com/bazelbuild/bazel/issues/2114 -- Change-Id: Ieaf38f6c5730fd7eeb784898a10746fe0359e81b Reviewed-on: https://cr.bazel.build/7455 MOS_MIGRATED_REVID=140129373
* Add gpu compile support to MSVC wrapper scriptGravatar Yun Peng2016-11-22
| | | | | | | | | | | | | | | | | | | | | | Fix https://github.com/bazelbuild/bazel/issues/2075 The logic for constructing nvcc options is from: third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl in TensorFlow repo. To make things configurable, this change makes cc_configure.bzl depend on more environment variables: CUDA_PATH: This variable points to Cuda installation directory CUDA_COMPUTE_CAPABILITIES: Specifiy cuda compute capabilities NO_WHOLE_ARCHIVE_OPTION: if set to 1, /WHOLEARCHIVE option won't be used. -- Change-Id: Ib1610a6d3423ca55a27c7a0f438703c05630a85c Reviewed-on: https://cr.bazel.build/7351 MOS_MIGRATED_REVID=139903436
* Rollback of commit cc3d79cca775cad9e9193d38bedf4df51a5c8a50.Gravatar Dmitry Lomov2016-11-21
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks bazel: http://ci.bazel.build/job/bazel-tests/329/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Support gold linker -- MOS_MIGRATED_REVID=139810019
* Support gold linkerGravatar Marcel Hlopko2016-11-17
| | | | | | -- Reviewed-on: https://bazel-review.googlesource.com/c/7372/ MOS_MIGRATED_REVID=139432850
* msvc_tool.py: Don't replace \ with \\ in NormPathGravatar Yun Peng2016-11-08
| | | | | | | | | | | | No need to use double back slash. This could help ease the Windows long path issue. Please see https://github.com/tensorflow/tensorflow/pull/5385 -- Change-Id: Iecca529209499062bfc1351e3a2b46dc51e0be09 Reviewed-on: https://bazel-review.googlesource.com/#/c/7210 MOS_MIGRATED_REVID=138397390
* Reimplement whole archive on WindowsGravatar Yun Peng2016-10-25
| | | | | | | | | | | | Use wrapper script to get object files if /WHOLEARCHIVE is not supported. fix https://github.com/bazelbuild/bazel/issues/1978 work towards https://github.com/bazelbuild/bazel/issues/1918 -- Change-Id: I675311478e65a1e1f3fa963187a5a8da531150d3 Reviewed-on: https://bazel-review.googlesource.com/#/c/6833 MOS_MIGRATED_REVID=137151817
* Recognize "/usr/lib/clang" as system include path on FreeBSD.Gravatar Piotr Sikora2016-10-24
| | | | | -- MOS_MIGRATED_REVID=136837274
* Rollback of commit ffdc05d2278d7f9c6e299c923019f689cde5fe76.Gravatar Yun Peng2016-10-19
| | | | | | | | | *** Reason for rollback *** Causes huge memory blow-up after the analysis phase in CppLinkAction (LinkCommandLine). -- MOS_MIGRATED_REVID=136467836
* Update MSVC CROSSTOOL to adapt 74b94328db5346e0f6c573731fcbaa85ca751304Gravatar Yun Peng2016-10-17
| | | | | | | -- Change-Id: I46e434e9add5647bd29945ba2f80a399999a4b17 Reviewed-on: https://bazel-review.googlesource.com/#/c/6692 MOS_MIGRATED_REVID=136325160
* Add global_whole_archive into MSVC CROSSTOOLGravatar Yun Peng2016-10-12
| | | | | | | | | | | | | This feature is needed when linking the _pywrap_tensorflow.dll on Windows. Which will force link all the libraries in deps. I used /WHOLEARCHVIE to implement this, so it only works with Visual Stduio 2015 update 2 or later. -- Change-Id: I0b018d3f4f482e56d1ebf78faa08fa46e1d60bbf Reviewed-on: https://bazel-review.googlesource.com/#/c/6612 MOS_MIGRATED_REVID=135923622
* Make MSVC wrapper script work with Python 3Gravatar Yun Peng2016-10-12
| | | | | | | | | Currently, TensorFlow only supports python3.5 on Windows. -- Change-Id: Ia3e805a7fdca06b79d9c00b0a2e83b9dd41e5f78 Reviewed-on: https://bazel-review.googlesource.com/#/c/6611 MOS_MIGRATED_REVID=135919759
* Move interface so building to action configsGravatar Marcel Hlopko2016-10-12
| | | | | | | | | This cl moves the conditional building of interface libraries from LinkCommandLine to action configs and features. It provides link_dynamic_library.sh to keep blaze backwards compatible. The script and related code can be deleted once all crosstools are updated. RELNOTES: No. -- MOS_MIGRATED_REVID=135799041
* Adding support for Linux s390xGravatar namrata-ibm2016-10-11
| | | | | | | | | | | We have added support for Linux s390x platform in Bazel. Closes #1891. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1891 MOS_MIGRATED_REVID=135777047
* Add action_config and feature for linking on WindowsGravatar Yun Peng2016-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also implemented whole archive feature on Windows 1. Pulled action_configs and features from CppLinkActionConfigs.java 2. Deleted many features not working on Windows. (AFAIK) including: symbol_counts output_execpath_flags_executable global_whole_archive_open runtime_root_flags global_whole_archive_close force_pic_flags 3. Added c++-link-interface-dynamic-library action config Not sure there is such thing on Windows, but it's currently in MANDATORY_LINK_TARGET_TYPES 4. Added build variable "whole_archive_object_files_params" 5. Automatically detect if linker supports /WHOLEARCHIVE and use the corresponding build variable -- Change-Id: I232798a0eb1a3291f972b313a81e678b0121d58c Reviewed-on: https://bazel-review.googlesource.com/#/c/6414 MOS_MIGRATED_REVID=135342093
* Fix cc_configure on WindowsGravatar Yun Peng2016-09-29
| | | | | | | -- Change-Id: Id359bc6f442f302e3dbaa60cedd6536ecf4f92ec Reviewed-on: https://bazel-review.googlesource.com/#/c/6333 MOS_MIGRATED_REVID=134575379
* Make cc_configure on Windows more robustGravatar Yun Peng2016-09-28
| | | | | | | | | | | | | 1. Throw an error if Bash-on-Windows is found instead of MSYS bash 2. Introduce BAZEL_VS environment variable 3. Output more information Fix https://github.com/bazelbuild/bazel/issues/1847 -- Change-Id: Ic4571c6c792d9b81df4cd800b8f19d121cc44c33 Reviewed-on: https://bazel-review.googlesource.com/#/c/6330 MOS_MIGRATED_REVID=134531295
* Some changes in MSVC toolchainGravatar Yun Peng2016-09-26
| | | | | | | | | These changes could help use build TensorFlow on Windows -- Change-Id: I98962add450da234d5965b091607817e991af383 Reviewed-on: https://bazel-review.googlesource.com/#/c/6270 MOS_MIGRATED_REVID=134266671
* Description redacted.Gravatar Laurent Le Brun2016-09-21
| | | | | -- MOS_MIGRATED_REVID=133693782
* Checking BAZEL_SH first when looking for bash on WindowsGravatar Yun Peng2016-09-16
| | | | | | | | | | In case cc_configure finds the wrong bash binary if user is running Windows 10 with bash on Windows. This should help https://github.com/bazelbuild/bazel/issues/1453 -- Change-Id: Iffd365e3e2dd2389882390dffdf6f3a88719530e Reviewed-on: https://bazel-review.googlesource.com/#/c/6072 MOS_MIGRATED_REVID=133270634
* Modify BUILD.static to use cc_toolchain_suiteGravatar Yun Peng2016-09-08
| | | | | | | Fixed #1736 -- MOS_MIGRATED_REVID=132529145
* Update all tests so that they use a cc_toolchain_suite instead of a ↵Gravatar Lukacs Berki2016-09-06
| | | | | | | | | filegroup to declare C++ toolchains. Tested by actually removing support for filegroups; it's a ~5-line change, but it's better to do that separately so that it can be rolled back easily if need be. -- MOS_MIGRATED_REVID=132320198
* Remove support for thin archives.Gravatar Lukacs Berki2016-08-23
| | | | | -- MOS_MIGRATED_REVID=130938527
* Use -fno-canonical-system-headers when supportedGravatar Brian Silverman2016-08-18
| | | | | | | | | | This makes the same change to cc_configure.bzl made to the hard-coded CROSSTOOL in 763f1397155fc7c12e1f1071a1bc942f91b867c4 to fix #1642 -- Change-Id: Ia05788243d0128ea4921f12c437ef6cebd83a4ff Reviewed-on: https://bazel-review.git.corp.google.com/#/c/5450/ MOS_MIGRATED_REVID=130636065
* cc_configure.bzl: Output error message when executing a command failsGravatar Yun Peng2016-07-20
| | | | | | | -- Change-Id: I9ccc29369a0b3b704b21737127de5744f2a94a59 Reviewed-on: https://bazel-review.googlesource.com/#/c/4102 MOS_MIGRATED_REVID=127945552
* Adding default value for environment variables and python binaryGravatar Yun Peng2016-07-18
| | | | | | | | | Also output more clear and useful information during auto configuration -- Change-Id: I7ea893ce8765d813b026bccc2c86e7aa2106baac Reviewed-on: https://bazel-review.googlesource.com/#/c/4051 MOS_MIGRATED_REVID=127703994
* Fix Windows tests.Gravatar Dmitry Lomov2016-07-15
| | | | | | | -- Change-Id: Ib480661ebbc522007edd77b374d6720d216b4508 Reviewed-on: https://bazel-review.googlesource.com/#/c/4050 MOS_MIGRATED_REVID=127534581
* Fixed repository.which() on WindowsGravatar Yun Peng2016-07-15
| | | | | | | | | Also removed previous workaround in cc_configure.bzl -- Change-Id: I6dcd039fc5e18af8f2d21969641d6bbd05c8badc Reviewed-on: https://bazel-review.googlesource.com/#/c/4034 MOS_MIGRATED_REVID=127518922
* 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