-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incompatible_use_specific_tool_files: Use appropriate artifacts from cc_toolchain as inputs to C++ actions. #8531
Comments
@benjaminp Can you please update this issue with migration details? |
This option makes 1. C++ compilation actions include only the toolchain's compiler_files artifacts as inputs not all_files. 2. Non-preprocessed assembler actions include only the toolchain's as_files artifacts as inputs not all_files. 3. Archiver link actions include the toolchain's ar_files artifacts as inputs rather than linker_files. See #8531. Closes #7725. PiperOrigin-RevId: 250880419
(I lack permissions to edit the actual issue, but here we go.)
Namely, under this flag:
MigrationFor every
Expected timelineDisabled by default in 0.27. |
With this flag enabled I get the following error on OSX 10.14.2 when I try to compile a cc_library.
Simple example here. |
…ains where needed. #8531 RELNOTES: None. PiperOrigin-RevId: 251796866
This option makes 1. C++ compilation actions include only the toolchain's compiler_files artifacts as inputs not all_files. 2. Non-preprocessed assembler actions include only the toolchain's as_files artifacts as inputs not all_files. 3. Archiver link actions include the toolchain's ar_files artifacts as inputs rather than linker_files. See bazelbuild#8531. Closes bazelbuild#7725. PiperOrigin-RevId: 250880419
Work on bazelbuild#8531. Closes bazelbuild#8544. PiperOrigin-RevId: 251428636
…ains where needed. bazelbuild#8531 RELNOTES: None. PiperOrigin-RevId: 251796866
This option makes 1. C++ compilation actions include only the toolchain's compiler_files artifacts as inputs not all_files. 2. Non-preprocessed assembler actions include only the toolchain's as_files artifacts as inputs not all_files. 3. Archiver link actions include the toolchain's ar_files artifacts as inputs rather than linker_files. See bazelbuild#8531. Closes bazelbuild#7725. PiperOrigin-RevId: 250880419
Work on bazelbuild#8531. Closes bazelbuild#8544. PiperOrigin-RevId: 251428636
…ains where needed. bazelbuild#8531 RELNOTES: None. PiperOrigin-RevId: 251796866
I'm confused why this is enabled now, but the master docs still say ar_files is currently unused (#6928). |
Looks like bazelbuild/bazel#8531 was the only thing that affected me this time around.
Bazel 1.0 flips [`--incompatible_use_specific_tool_files`][1]. We now need to specify all compilation dependencies in `compiler_files`. [1]: bazelbuild/bazel#8531
This will fix Cuda and ROCm RBE build with Bazel 1.0 Related bazelbuild/bazel#8531 Preconfigured toolchains are updated by: tensorflow/third_party/toolchains/preconfig/generate/update.sh ubuntu16.04-py3-gcc7_manylinux2010-cuda10.1-cudnn7-tensorrt6.0 tensorflow/third_party/toolchains/preconfig/generate/update.sh ubuntu16.04-py3-gcc7_manylinux2010-cuda10.0-cudnn7-tensorrt5.1 tensorflow/third_party/toolchains/preconfig/generate/update.sh ubuntu16.04-py3_opt-gcc5-rocm PiperOrigin-RevId: 279942421 Change-Id: Ic8538d49b970b074e35acebc1345482170d98847
See bazelbuild/bazel#8531 for more details on what this flag is. I'll need to clean up the cc_toolchain definitions to appropriately sort the tool files.
Had to add `ar_files` and `as_files` to the toolchain rule. See: bazelbuild/bazel#8531 Tried breaking up the filegroups, but the toolchain is too convoluted to be worth it. Found out along the way, though, that the "cpp" `tool_path` pointed to the wrong binary name, so fixed that.
See bazelbuild/bazel#8531. Closes #9126. RELNOTES: The --incompatible_use_specific_tool_files flag has been flipped. See bazelbuild/bazel#9126 for more information. PiperOrigin-RevId: 263120622
cc_toolchain
has attributes corresponding to various toolchain components likear_files
,compiler_files
, andas_files
. Previously, Bazel used broad file groups likeall_files
as inputs for several classes of actions and ignored the more specific toolchain attributes.--incompatible_use_specific_tool_files
brings these attributes into use.Namely, under this flag:
compiler_files
rather thanall_files
.ar_files
rather thanlinker_files
.as_files
rather thanall_files
. Preprocessed assembly actions usecompiler_files
because preprocessing is usually done by the C compiler.Relevant issues: #6927, #6928.
Migration
For every
cc_toolchain
rule, ensurecompiler_files
contains the compiler binary and standard library header files if necessaryas_files
includes the assembler (e.g.,gas
)ar_files
includes the static archive tool (e.g.,ar
)Expected timeline
Disabled by default in 0.27.
Enabled in the September 2019 release.
The text was updated successfully, but these errors were encountered: