aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp
Commit message (Collapse)AuthorAge
* adding more env vars to invalidation listGravatar Nicolas Lopez2017-04-04
| | | | | | | | | It seems several env vars that are used by cc_configure are not in the invalidation list and not included in the bootstrap compile. Adding them. Change-Id: I67f73ae09abbe9033bcbbcb4026dab04d225b699 PiperOrigin-RevId: 152139948
* Disable cc_configure tests on debian stretch altogetherGravatar hlopko2017-04-04
| | | | | | | | | | | | | Not only opt builds fail, also fastbuild: http://ci.bazel.io/view/Dashboard/job/bazel-docker-tests/lastCompletedBuild/BAZEL_VERSION=latest,PLATFORM_NAME=docker/console The issue is tracked here: https://github.com/bazelbuild/bazel/issues/2418 RELNOTES: NONE. PiperOrigin-RevId: 152109844
* Fix MSVC CROSSTOOL for linking against lib filesGravatar pcloudy2017-03-31
| | | | | | | | | | | | | | | | 1. No need to add /WHOLEARCHIVE option for object files 2. When linking against a .lib file of a dll with /WHOLEARCHIVE option, the linker produces an error. So strip it in msvc_link.py. The second point is a temporary workaround to make TF GPU build work, we'll fix it properly when we figure out how to deal with .lib, .dll, .pdb files on Windwos. Fix https://github.com/bazelbuild/bazel/issues/2753 Change-Id: Ia77b67546bfd4f19ceeb0f6ab9ab3b7a598c4fe9 PiperOrigin-RevId: 151811504
* Docker tests: deactivate Ubuntu 15.10 and Debian stretch optGravatar dmarting2017-03-29
| | | | | | | - Ubuntu 15.10 has passed end of life - Debian stretch is flaky with optimized build (see #2418) PiperOrigin-RevId: 151567467
* Replacing hardcoded use of 'local' for env variables in cc autoconfigGravatar Nicolas Lopez2017-03-28
| | | | | | | | -- Change-Id: Ic1632229e67bf82b69983f9614258c5fd54c12d8 Reviewed-on: https://cr.bazel.build/9390 PiperOrigin-RevId: 151422502 MOS_MIGRATED_REVID=151422502
* Don't filter out warning messages from MSVC python wrappers anymore.Gravatar Yun Peng2017-03-28
| | | | | | | | | | | Fixed: https://github.com/bazelbuild/bazel/issues/2666 See: https://github.com/bazelbuild/bazel/issues/2726 RELNOTES: Windows MSVC wrappers: Not filtering warning messages anymore, use --copt=-w and --host_copt=-w to suppress them. -- PiperOrigin-RevId: 151422047 MOS_MIGRATED_REVID=151422047
* Add test for ubuntu 16.04Gravatar Damien Martin-Guillerez2017-03-27
| | | | | | | | | | This only add the bootstrap tests. We could add more tests but we should probably rather just update the 15.10 VMs to run Ubuntu 16.04. Tracking issue #2741. -- PiperOrigin-RevId: 151299465 MOS_MIGRATED_REVID=151299465
* cc_configure: more generic msys_root discovery Gravatar László Csomor2017-03-23
| | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/2725 Related to https://github.com/bazelbuild/bazel/issues/2447 -- Change-Id: I5cc7fba43ae46bc9ef47bcaf9efaf2a0b9911bc4 Reviewed-on: https://cr.bazel.build/9468 PiperOrigin-RevId: 150881196 MOS_MIGRATED_REVID=150881196
* MSVC wrapper: support -W[no]implicit-function-decl Gravatar Laszlo Csomor2017-03-14
| | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/2672 -- Change-Id: Idfbc1841cc4f448939000e58cc9712ab8daa1a2f Reviewed-on: https://cr.bazel.build/9353 PiperOrigin-RevId: 150045801 MOS_MIGRATED_REVID=150045801
* Make MSVC CROSSTOOL default on Windows Gravatar Yun Peng2017-03-08
| | | | | | | | | | | | | | | | The default C++ CROSSTOOL on Windows now becomes MSVC, --cpu=x64_windows_msvc is still supported To use MSYS toolcahin, add --cpu=x64_windows_msys and --host_cpu=x64_windows_msys for host compilation See https://github.com/bazelbuild/bazel/issues/2627 -- Change-Id: Ie788a39cb5ffbc9fc956ccfd51a3cc816c74543a Reviewed-on: https://cr.bazel.build/9292 PiperOrigin-RevId: 149530250 MOS_MIGRATED_REVID=149530250
* Introduce strip_debug_symbols feature to crosstoolGravatar Marcel Hlopko2017-03-08
| | | | | | | | | This cl removes hard coded -Wl,-S flag from Blaze and moves it to the crosstool. -- PiperOrigin-RevId: 149525225 MOS_MIGRATED_REVID=149525225
* Make gold autodetection more robust on macosGravatar Marcel Hlopko2017-03-08
| | | | | | | | | | | | | | Some macos clang versions don't fail when setting -fuse-ld=gold, which makes cc_configure.bzl think gold linker is available, when it is actually not. The sideeffect of this cl is that we will not autodetect gold when only a very old (year 2010 and older) is present. I assume this is fine. Fixes #2502 -- PiperOrigin-RevId: 149521872 MOS_MIGRATED_REVID=149521872
* Rollback of commit 4af8f5bff567e7cad179fb803070764791353f8a.Gravatar Googler2017-03-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixing the test, which relied on a magic hidden feature I removed. *** Original change description *** Automated [] rollback of commit 5621a2c73337d82fe328069dbb0621e46e9e1c25. *** Reason for rollback *** This change broke bazel-docker-tests: http://ci.bazel.io/job/bazel-docker-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=docker/457/console *** Original change description *** This change adds support for a docker_bundle rule, refactoring a number of interfaces to support shared use with docker_build. This also fixes "docker load -i <bazel output>", which was broken on newer clients due to a lack of tag data in manifest.json... *** -- PiperOrigin-RevId: 149110613 MOS_MIGRATED_REVID=149110613
* MSVC wrapper: support -I gcc flagGravatar Laszlo Csomor2017-02-28
| | | | | | | | See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 148750327 MOS_MIGRATED_REVID=148750327
* Cleanup migration-only build variablesGravatar Marcel Hlopko2017-02-27
| | | | | | -- PiperOrigin-RevId: 148632169 MOS_MIGRATED_REVID=148632169
* Fix coverage section in the autodetected crosstool for windowsGravatar Marcel Hlopko2017-02-24
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2582 -- PiperOrigin-RevId: 148455784 MOS_MIGRATED_REVID=148455784
* Fix autodetection of c++ coverage on osxGravatar Marcel Hlopko2017-02-24
| | | | | | | | | | | | | Fixes #2275. The logic that adds 'coverage' feature to the toolchain if not present in CppConfiguration only works for linux targets. This cl teaches cc_configure.bzl about this feature so it can be autodetected on osx correctly (although the autodetection logic in this cl is rather naive). -- PiperOrigin-RevId: 148336592 MOS_MIGRATED_REVID=148336592
* Make the interface dynamic library builder a regular label instead of a ↵Gravatar Lukacs Berki2017-02-17
| | | | | | | | magic artifact. -- PiperOrigin-RevId: 147830857 MOS_MIGRATED_REVID=147830857
* cc_configure: declare environment variables for invalidation Gravatar Damien Martin-Guillerez2017-02-15
| | | | | | | | | | And stop setting the local flag -- Change-Id: I97c76cf78a191a5f37c8bb3cd32e78df5aeeb885 Reviewed-on: https://cr.bazel.build/8223 PiperOrigin-RevId: 147591728 MOS_MIGRATED_REVID=147591728
* Make Bazel work with Visual Studio 2017 Gravatar Yun Peng2017-02-14
| | | | | | | | | | | | | | | Now Bazel can detect MSVC from Visual Studio 2017 or Visual C++ build tools 2017. Also modified build_windows_jni.sh to make it work with VS 2017. Fixed: https://github.com/bazelbuild/bazel/issues/2440 -- Change-Id: I4afbce809ff74634f32fab87efe5e7f0b3f60c95 Reviewed-on: https://cr.bazel.build/8890 PiperOrigin-RevId: 147467993 MOS_MIGRATED_REVID=147467993
* Detect Visual C++ build tools through vcvarsqueryregistry.bat Gravatar Yun Peng2017-02-08
| | | | | | | | | | | See: https://github.com/bazelbuild/bazel/issues/2434 Fixed https://github.com/bazelbuild/bazel/issues/2448 -- Change-Id: I12b109af81e0eb8948fd1d7a7d2bbfcf6baa7ca4 Reviewed-on: https://cr.bazel.build/8693 PiperOrigin-RevId: 146886981 MOS_MIGRATED_REVID=146886981
* Add quotes to improve space supportGravatar Alexander Chung2017-02-07
| | | | | | | | | | | These changes addresses issues where Windows users have a space in their username. Allows the default output_base path to be used. Closes #2491. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2491 PiperOrigin-RevId: 146773331 MOS_MIGRATED_REVID=146773331
* Windows: fix off-by-one errors with MAX_PATHGravatar Laszlo Csomor2017-02-07
| | | | | | | | | | | | | | | | | | In almost every place we compared paths against MAX_PATH, we had it wrong. MAX_PATH is the null-terminated maximum length, so paths exactly MAX_PATH long (not counting the null-terminator) were incorrectly considered short. Also fix the error message in the MSVC python wrapper, because it reported an incorrect path length limit in the warning message. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 146762382 MOS_MIGRATED_REVID=146762382
* Windows, cc_configure: use BAZEL_SH, not cygpathGravatar Laszlo Csomor2017-02-01
| | | | | | | | | | | | | | Use the BAZEL_SH envvar while creating the Windows CROSSTOOL file, instead of calling "cygpath -m /". The latter is based on the assumption that we are running under MSYS. Fixes https://github.com/bazelbuild/bazel/issues/2463 See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 146227581 MOS_MIGRATED_REVID=146227581
* msvc_tools.py.tpl: Suppress all warning messages if /w is specified Gravatar Yun Peng2017-01-26
| | | | | | | | | | | Fixed #2433 Working towards #1897 -- Change-Id: I62ed4eabac5c788f90b10e9dfe4c9ffee6883097 Reviewed-on: https://cr.bazel.build/8492 PiperOrigin-RevId: 145675987 MOS_MIGRATED_REVID=145675987
* msvc_tools.py.tpl: Change default runtime library to staticGravatar Yun Peng2017-01-25
| | | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/2415 -- PiperOrigin-RevId: 145530562 MOS_MIGRATED_REVID=145530562
* Update _get_cpu_value() to fix issue #1264 Gravatar Marcel Hlopko2017-01-24
| | | | | | | | | | | | | I have tested on NVIDA Jetson TK1 and bazel was able to compile. I believe with this quick fix would make bazel installation on Linux ARM devices easier. I have been spending 5 hours to figure out a correct way to install bazel. Closes #2389. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2389 PiperOrigin-RevId: 145401787 MOS_MIGRATED_REVID=145401787
* Consume linker_param_file build variable in windows crosstoolGravatar Marcel Hlopko2017-01-24
| | | | | | | | Fixes #2405 -- PiperOrigin-RevId: 145394624 MOS_MIGRATED_REVID=145394624
* Windows: fix MSVC compilations at HEAD Gravatar László Csomor2017-01-23
| | | | | | | | | | | | | | | | | | | | | | Strip quotes from arg0 in call_python.bat . This bug was has been there longer, but never got triggered, because we only quoted arg0 if it contained spaces, which it most likely never actually did, or not in this particular case. After submitting e68c6b5 and 9e8bc63 which fixed the compilation errors in the former, we started always quoting argv0 in subprocesses, which exposed this bug, leading to a corrupt DRIVER_DIR value in call_python.bat. Fixes https://github.com/bazelbuild/bazel/issues/2402 -- Change-Id: Iab5c00001fc4307f2e23c46c8187f5ef15d83d41 Reviewed-on: https://cr.bazel.build/8436 PiperOrigin-RevId: 145310121 MOS_MIGRATED_REVID=145310121
* Expose type of library_to_link in CROSSTOOLGravatar Marcel Hlopko2017-01-23
| | | | | | | | | | This cl relieves us from hard-coding -l and -l: flags in Bazel. To be able to express the behavior in CROSSTOOL, we need to know what type of library are we dealing with. -- PiperOrigin-RevId: 145271426 MOS_MIGRATED_REVID=145271426
* C++ test: test with Debian stretch Gravatar Damien Martin-Guillerez2017-01-17
| | | | | | | | | | Fixes #2360. -- Change-Id: I33dcfa1128b74f20dde14c5b5e095790a8961bd5 Reviewed-on: https://cr.bazel.build/8219 PiperOrigin-RevId: 144685099 MOS_MIGRATED_REVID=144685099
* Support gold linker in cc_configure.bzlGravatar Marcel Hlopko2017-01-03
| | | | | | | | RELNOTES: Autodetect gold linker in cc_configure.bzl -- PiperOrigin-RevId: 143374572 MOS_MIGRATED_REVID=143374572
* Guard -pass-exit-codes to support clangGravatar Marcel Hlopko2016-12-23
| | | | | | | | | | | | | Currently using CC=clang will fail because -pass-exit-codes is an unsupported option (Github issue #2121). This is a minimal fix to add a guard for this option. -- Change-Id: I86c3415ea7280a3af1d5579c1374bfa74ce31b5d Reviewed-on: https://cr.bazel.build/8070 PiperOrigin-RevId: 142829737 MOS_MIGRATED_REVID=142829737
* Introduce --apple_crosstool_top, which sets the crosstool for sources in ↵Gravatar Cal Peyser2016-12-23
| | | | | | | | objc_*/apple_*/ios_* targets and their dependencies. -- PiperOrigin-RevId: 142793925 MOS_MIGRATED_REVID=142793925
* Add stub ios toolchain to bazel BUILD.staticGravatar Cal Peyser2016-12-23
| | | | | | -- PiperOrigin-RevId: 142775180 MOS_MIGRATED_REVID=142775180
* Rename toolchain_flags to legacy_link_flags build variableGravatar Marcel Hlopko2016-12-22
| | | | | | -- PiperOrigin-RevId: 142767245 MOS_MIGRATED_REVID=142767245
* Rollback of commit 87fd5baeaa3f983bbec0c0dbc7b16eb52cf2267f.Gravatar Tobias Werth2016-12-22
| | | | | | -- PiperOrigin-RevId: 142758502 MOS_MIGRATED_REVID=142758502
* Move hardcoded toolchain linker flags to CROSSTOOLGravatar Marcel Hlopko2016-12-22
| | | | | | | | | | | | | This cl introduces another build variable: toolchain_flags and updates all the affected crosstools (those which started using action_configs, because the defaults from CppLinkActionConfigs are not applied then). This build variable is a requirement for follow-up refactoring exposing param_files build variable. With toolchain_flags and param_files we will have full control over flags placement on the link command line. -- PiperOrigin-RevId: 142741060 MOS_MIGRATED_REVID=142741060
* Move hardcoded -L linker flags to CROSSTOOLGravatar Marcel Hlopko2016-12-22
| | | | | | | | | | | This cl introduces another build variable: library_search_directories, removes hardcoded -L generation from blaze and updates all the affected crosstools (those which started using action_configs, because the defaults from CppLinkActionConfigs are not applied then). -- PiperOrigin-RevId: 142738674 MOS_MIGRATED_REVID=142738674
* Introduce --apple_crosstool_top, which sets the crosstool for sources in ↵Gravatar Cal Peyser2016-12-22
| | | | | | | | objc_*/apple_*/ios_* targets and their dependencies. -- PiperOrigin-RevId: 142702735 MOS_MIGRATED_REVID=142702735
* Rollback AppleCrosstoolChangeGravatar Cal Peyser2016-12-22
| | | | | | -- PiperOrigin-RevId: 142692398 MOS_MIGRATED_REVID=142692398
* Introduce --apple_crosstool_top, which sets the crosstool for sources in ↵Gravatar Cal Peyser2016-12-22
| | | | | | | | objc_*/apple_*/ios_* targets and their dependencies. -- PiperOrigin-RevId: 142673622 MOS_MIGRATED_REVID=142673622
* Power supportGravatar Nishidha Panpaliya2016-12-21
| | | | | | | | | Closes #2139. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2139 PiperOrigin-RevId: 142570236 MOS_MIGRATED_REVID=142570236
* Add a default ios_x86_64 toolchain stub to the automatically generated bazel ↵Gravatar Cal Peyser2016-12-19
| | | | | | | | crosstool. -- PiperOrigin-RevId: 142459402 MOS_MIGRATED_REVID=142459402
* Only enable _FORTIFY_SOURCE for opt builds.Gravatar Marcel Hlopko2016-12-16
| | | | | | | | | | | | | | | | | | Prevents warnings like the following under fastbuild/dbg: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/x86_64-pc-linux-gnu/bits/os_defines.h:39:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/x86_64-pc-linux-gnu/bits/c++config.h:482, from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/string:38, from third_party/protobuf/3.0.0/src/google/protobuf/empty.pb.h:7, from third_party/protobuf/3.0.0/src/google/protobuf/empty.pb.cc:5: /usr/include/features.h:331:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] # warning _FORTIFY_SOURCE requires compiling with optimization (-O) -- Change-Id: I364bb2962ef930c9079ebddcc5855a0b4ee5c138 Reviewed-on: https://cr.bazel.build/7050 PiperOrigin-RevId: 142229574 MOS_MIGRATED_REVID=142229574
* pass -fno-canonical-headers only onceGravatar Marcel Hlopko2016-12-15
| | | | | | | | | | | Both compiler_flags and unfiltered_cxx_flags contained "-fno-canonical-headers". We should only need the unfiltered setting. -- Change-Id: I09d99f2bad10774e72745e437ae4900d22b8a723 Reviewed-on: https://cr.bazel.build/7730 PiperOrigin-RevId: 142171553 MOS_MIGRATED_REVID=142171553
* Simplify propagation of linker params by replacing global_whole_archive withGravatar Marcel Hlopko2016-12-09
| | | | | | | | individual --whole_archive/--no_whole_archive blocks. -- PiperOrigin-RevId: 141555295 MOS_MIGRATED_REVID=141555295
* Improved support for /MD and /MT in MSVC [#2120]Gravatar Javier Dehesa2016-12-07
| | | | | | | | | | | | | | | | | msvc_tools.py now prefers the last /MT / /MD option given; if none, /MD is preferred. Additionally, the behaviour of the copt -g has been improved to enforce the debug version of the user-selected runtime, not necessarily /MTd. Issue: #2120 Closes #2141. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2141 PiperOrigin-RevId: 141294930 MOS_MIGRATED_REVID=141294930
* Windows: Fix cuda option parsing when /Od is passedGravatar Yun Peng2016-12-07
| | | | | | | | | | When not using -c opt, /Od will be passed instead of /O2 -- Change-Id: I693020d51d45e054e10a94a5e1754b89c44c7ff4 Reviewed-on: https://cr.bazel.build/7670 PiperOrigin-RevId: 141291490 MOS_MIGRATED_REVID=141291490
* move linker flags from compiler_flags to linker_flags; fix option syntaxGravatar Marcel Hlopko2016-12-07
| | | | | | | | | | | | | | | | | "-Wl,-z,-relro,-z,now" was in compiler_flags, which is not very useful because compiler_flags are not passed to the compilation driver for link commands. "-z -relro" is not even a valid linker flag set because of the spurious leading dash on "relro": $ gold -z -relro gold: -relro: unknown -z option -- Change-Id: Ic987312b7dec5cc68e7195b5ea88945653a93200 Reviewed-on: https://cr.bazel.build/7570 PiperOrigin-RevId: 141282978 MOS_MIGRATED_REVID=141282978