| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
osx_cc_wrapper.sh was not working correctly in cases when multiple
rpaths were specified on linking command line. This cl modifies the
wrapper to record all rpaths, and use the rpath that corresponds to a particular
library when updating libraries install name.
Fixes #3450
RELNOTES: None.
Change-Id: I614694a792b6724a1db9814ee25af1802560c463
PiperOrigin-RevId: 165618946
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change prevents leaking irrelevant envs to C++ actions.
Before running VCVARSALL.BAT, we set
PATH=<system root>
INCLUDE=
LIB=
See https://github.com/bazelbuild/bazel/issues/3500
Change-Id: I767a36a3be3c8c01ad5cac2a7762edd34047e1bf
PiperOrigin-RevId: 164242012
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no_stripping feature is enabled, then strip action config is not
necessary, building stripped binary will just copy the orignial binary.
Fix https://github.com/bazelbuild/bazel/issues/3482
Also fixed CI breakage:
https://github.com/bazelbuild/bazel/issues/3505
Change-Id: Ie78fe174c42248c9b3e930008eef96dcd1864741
PiperOrigin-RevId: 164237588
|
|
|
|
|
|
|
|
|
|
|
| |
This cl changes copts to be immutable (and changes addCopts methods into
setCopts, so it's simpler to reason about copts) and exposes copts as a build
variable. It also introduces CompileBuildVariablesTest, similar to
LinkBuildVariablesTest, to test that right build variables are exposed for right
actions.
RELNOTES: None.
PiperOrigin-RevId: 163876774
|
|
|
|
|
|
|
|
|
|
| |
Adds back a compiler test empty .cc file. Seems to be an omission in https://github.com/bazelbuild/bazel/commit/65cda4f219e564ccb190b2992151658dfae9904
The _is_gold_supported check in unix_cc_configure.bzl always fails without this change, since the file it's checking with isn't created. Looks like there may be other effects through _add_option_if_supported, although I only noticed because apparently I have written linker-specific code.
Closes #3484.
PiperOrigin-RevId: 163832465
|
|
|
|
|
|
|
| |
Fix https://github.com/bazelbuild/bazel/issues/3473
RELNOTES: None
PiperOrigin-RevId: 163686215
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 163679651
|
|
|
|
|
|
|
|
| |
Fix https://github.com/bazelbuild/bazel/issues/3474
Fix https://github.com/bazelbuild/bazel/issues/3472
RELNOTES: None
PiperOrigin-RevId: 163677371
|
|
|
|
|
|
|
| |
fix https://github.com/bazelbuild/bazel/issues/3442
RELNOTES:
PiperOrigin-RevId: 163039890
|
|
|
|
|
|
|
|
|
| |
BUILD file. They must use "-" instead of "/"
otherwise Bazel believes the linkopts entry
declares a (invalid) label.
Change-Id: I6ad33c3f51c37f59e7d3b92be872fc4e2b27d434
PiperOrigin-RevId: 162597691
|
|
|
|
|
|
|
|
|
| |
Python tests.
RELNOTES: None.
Change-Id: I76c4f11323b1c0690e20d54f129abd671275acb0
PiperOrigin-RevId: 161934858
|
|
|
|
|
|
|
| |
Fixed https://github.com/bazelbuild/bazel/issues/3366
RELNOTES: None
PiperOrigin-RevId: 161926642
|
|
|
|
|
|
|
|
|
|
| |
their own.
The alias_rules.bzl hack is required because Bazel at HEAD needs to be able to be built
with released Bazel, which doesn't know these rules yet.
RELNOTES: None.
PiperOrigin-RevId: 161808672
|
|
|
|
|
|
|
| |
Should be USE_MSVC_WRAPPER instead NO_MSVC_WRAPPER now.
RELNOTES: None
PiperOrigin-RevId: 161668110
|
|
|
|
|
|
|
|
|
| |
set USE_MSVC_WRAPPER=1 if you still want to use wrapper script.
RELNOTES:
Windows: Wrapper-less CROSSTOOL becomes default now.
set USE_MSVC_WRAPPER=1 if you still want to use wrapper script.
PiperOrigin-RevId: 161654018
|
|
|
|
|
|
|
|
|
| |
/DNOMINMAX is a very common use and no one has complained about it yet, so keep it in CROSSTOOL
Fixed https://github.com/bazelbuild/bazel/issues/3347
RELNOTES: None.
PiperOrigin-RevId: 161381862
|
|
|
|
|
|
|
| |
After reviewing these options' meanings, I don't think we need to put them in CROSSTOOL. Users can add them in their own BUILD files if needed, so that they don't have to undefine them. See https://github.com/bazelbuild/bazel/pull/3310
RELNOTES: None
PiperOrigin-RevId: 161177879
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now there are 2 ways how to control crosstool patches. If there is
'no_legacy_features' feature defined, no patching will be performed. If there is
not, then depending on whether any c++ action_config is defined one set of
patches is applied, or other set of patches is applied. It's a mess, and in the
most cases, crosstools that do not define 'no_legacy_features' need the full
patching. This cl fixes the crosstools that need the partial patching.
RELNOTES: Crosstool patches are only applied if the toolchain doesn't define
'no_legacy_features' feature.
PiperOrigin-RevId: 160979463
|
|
|
|
|
|
|
|
|
| |
BAZEL_PYTHON is no logger needed if we don't use wrapper script.
Also, decode stdout and stderr so that tests work with Python 3.
Change-Id: I61b60775a51f8322b40f7682e6cf3f63e8e8b6cc
PiperOrigin-RevId: 160874163
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now we allowed implicit iteration, e.g.:
flag_group { flag: '%{some_sequence_variable}' }
From now on, snippet above will raise an error. We require explicit
'iterate_over' message, e.g.:
flag_group {
iterate_over: 'some_sequence_variable'
flag: '%{some_sequence_variable}'
}
RELNOTES: Implicit iteration in the CROSSTOOL has been removed, use explicit 'iterate_over' message.
PiperOrigin-RevId: 160871888
|
|
|
|
|
|
|
| |
This is for debugging https://github.com/bazelbuild/bazel/issues/3273
Change-Id: I84e260ae1a22147fed0cffc2960352c77af2cf58
PiperOrigin-RevId: 160399209
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a better location and tools/cpp is packaged in embedded_tools that make the test ends-up in embedded_tools, which is requiring network access
to build embedded_tools!
Side-effect: have to correctly mock the bazel workspace file on a couple
of tests.
This is blocking on https://bazel-review.googlesource.com/c/12350/
PiperOrigin-RevId: 160265524
|
|
|
|
|
|
|
| |
See https://github.com/bazelbuild/bazel/issues/3237
Change-Id: I4befad7a329695a952f792605b4936b93cfa2a7f
PiperOrigin-RevId: 160249037
|
|
|
|
|
|
|
|
|
|
|
| |
Don't add $TMP as cxx_builtin_include_directory, instead use
$TMP/nvcc_inter_files_tmp_dir
as tmp direcotry for nvcc.exe
Fixed https://github.com/bazelbuild/bazel/issues/3202
RELNOTES: None.
PiperOrigin-RevId: 160109290
|
|
|
|
|
|
|
| |
Now the MSVC CROSSTOOL can truly be wrapper-free! \o/
RELNOTES: None.
PiperOrigin-RevId: 159962674
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split original cc_configure.bzl into 4 different files:
lib_cc_configure.bzl: base library for C++ toolchain configuration
unix_cc_configure.bzl: For Unix platforms
osx_cc_configure.bzl: For macOS
windows_cc_configure.bzl: For Windows
Change-Id: I76fa44294c6ca4304f0a94f3a1c57d6e76141667
PiperOrigin-RevId: 159801973
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous registry value we are querying only exists when Visual
Studio is installed. If user only has VC build tools installed and
doesn't set env vars like BAZEL_VS, VS140COMNTOOLS, VC won't be
detected.
HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7
exists in both situations and works for all VS versions.
Change-Id: I07b5593e882e23fa9e0079e082e6d357b905736d
PiperOrigin-RevId: 158841618
|
|
|
|
|
| |
Change-Id: Ia2510a2b8df728c02f77e2df4effff3232cfe3a2
PiperOrigin-RevId: 158685074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To enable a wrapper free MSVC CROSSTOOL,
set NO_MSVC_WRAPPER=1 or add --action_env=NO_MSVC_WRAPPER=1 flag.
Note that we still use windows_cc_wrapper.bat to invoke cl.exe
and link.exe for different actions.
Result for bazel build src/main/cpp:client :
NO_WRAPPER:
INFO: Elapsed time: 76.833s, Critical Path: 16.70s
WRAPPER:
INFO: Elapsed time: 138.517s, Critical Path: 27.78s
Change-Id: Iaf6b67fc791ae1f8b62d332e47f96f719510bda1
PiperOrigin-RevId: 158118110
|
|
|
|
|
| |
RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag.
PiperOrigin-RevId: 157685703
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157572063
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157529642
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If MSVC wrapper is removed, users cannot put flags like `-Wl,ws2_32.lib`
in linkopts of C++ rules on Windows. Instead, they should do `-DEFAULTLIB:ws2_32.lib`.
This change is to make the wrapper script also accpet
-DEFAULTLIB:library option.
https://msdn.microsoft.com/en-us/library/229a6ysd.aspx
Change-Id: I0cf9f5529f833470166488100b70fb497384e083
PiperOrigin-RevId: 156978364
|
|
|
|
|
|
|
| |
Passing /MT or /MD option using --compiler_options to nvcc
Change-Id: Idf02ca0a4abf25bced397f5fffc1bc10ff0c160f
PiperOrigin-RevId: 156976225
|
|
|
|
|
|
|
|
|
| |
The default warning level will become /W1 which only display severe warnings.
https://msdn.microsoft.com/en-us/library/thxezb7y.aspx
RELNOTES: None
PiperOrigin-RevId: 156972872
|
|
|
|
|
|
|
|
|
| |
This:
1. Forces ar invocations to go through xcrunwrapper (thus having the environment variables set correctly so that the appropriate xcode is used)
2. Institutes a fix for non-hermeticism around object file timestamps.
RELNOTES: None.
PiperOrigin-RevId: 156759530
|
|
|
|
|
|
|
|
| |
This fixes #3000
Closes #3002.
PiperOrigin-RevId: 156046356
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, we use /MT(/MTd for debug mode) and link to
libcmt.lib(libcmtd.lib).
Users can set USE_DYNAMIC_CRT=1 or add --action_env=USE_DYNAMIC_CRT=1 to
switch to /MD and msvcrt.lib (/MDd and msvcrtd.lib for debug mode)
Reference: https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
Fixed https://github.com/bazelbuild/bazel/issues/2120
Change-Id: I61e65ace82163acd456bf82f2b108c5fe8d8a8ce
PiperOrigin-RevId: 155850886
|
|
|
|
|
|
|
|
|
|
| |
%foo% syntax is not allowed in Crosstool, but some Windows environment variables
that we read in cc_configure.bzl can reference other variables, therefore in
order not to crash, we need to escape them before putting the values into the
Crosstool.
RELNOTES: None.
PiperOrigin-RevId: 155602425
|
|
|
|
|
|
|
| |
platform types.
RELNOTES: None.
PiperOrigin-RevId: 154993630
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke rules_go and all its dependencies:
http://ci.bazel.io/job/rules_web/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/464/console
http://ci.bazel.io/job/rules_go/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/823/console
http://ci.bazel.io/job/buildifier/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/557/console
Bisected with `bazel build ...` in rules_go
The error message is still -whole-archive appearing in rules_go.
*** Original change description ***
Rollforward of: Basic open-source crosstool to support targeting apple platform types.
RELNOTES: None.
PiperOrigin-RevId: 154825240
|
|
|
|
|
|
|
| |
platform types.
RELNOTES: None.
PiperOrigin-RevId: 154547417
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 154426101
|
|
|
|
|
|
|
|
| |
Instead of parsing .d file generated by wrapper script,
we directly parse the output of /showIncludes option.
Change-Id: Id94e20a5cb05a494a793fd6a43756d44d27cea8a
PiperOrigin-RevId: 154161939
|
|
|
|
|
|
|
|
|
|
|
| |
1. Moved /nologo flag into feature
2. No need to specify -m64, adding /MACHINVE:X64 as linker flag
3. Still use wrapper script to add /MT or /MD for now, because our users
are depending on it: https://github.com/bazelbuild/bazel/issues/2120
We need a plan first before move them into CROSSTOOL
Change-Id: If5e4c01a900fcf9e93877e04a893879897bff3a3
PiperOrigin-RevId: 154036870
|
|
|
|
|
|
|
|
|
| |
See Issue #2120: if we specify /MD for copts, we should attempt to use
MSVCRTx.lib instead of LIBCMTx.lib.
Closes #2862.
PiperOrigin-RevId: 154032031
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke //src/test/shell/bazel:cc_inc_library_test on darwin
see http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/704/console
*** Original change description ***
Basic open-source crosstool to support targetting apple platform types.
RELNOTES: None.
PiperOrigin-RevId: 153460334
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Add /Z7 as compiler flag in CROSSTOOL, this causes full debugging
infomation built into object files, no PDB file is generated.
2. Add /DEBUG as linker flag so that a PDB file will be generated for
executable or dll.
* /DEBUG:FULL for dbg mode. the full PDB can be used to debug the
executable when no other build products are available, such as
when the executable is deployed.
* /DEBUG:FASTLINK for fastbuild mode. object files are still needed
when debugging the executable, but linking speed can be two to four
times faster that full PDB generation.
* No option is added for opt mode.
More detailed info: https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx
3. Add an empty feature in MSVC CROSSTOOL to tell Bazel we need PDB file
4. Add PDB file artifact in an output named pdb_file of cc_binary,
then you can build the pdb file by bazel build //foo/bar:bin --output_groups=pdb_file
5. Add test for PDB file generation
Change-Id: Ia5096470187ebca72f2c804f32d5b723f40c0b85
PiperOrigin-RevId: 153449059
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 153360877
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks internal tests that use nonstandard crosstools
*** Original change description ***
Make C++ archiving use action_configs instead of hardcoded flags
RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag.
PiperOrigin-RevId: 153344597
|