Skip to content
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

Switch to -fdebug-compilation-dir #12354

Closed

Conversation

keith
Copy link
Member

@keith keith commented Oct 26, 2020

This removes some argument parsing from wrapped_clang. This flag was
introduced in clang 9.

This removes some argument parsing from wrapped_clang. This flag was
introduced in clang 9.
@google-cla google-cla bot added the cla: yes label Oct 26, 2020
@gregestren gregestren added the z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple label Nov 2, 2020
@aiuto aiuto requested a review from oquenchil November 4, 2020 04:43
@aiuto aiuto removed their assignment Nov 4, 2020
@susinmotion susinmotion added team-Rules-CPP Issues for C++ rules and removed z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple labels Nov 5, 2020
Copy link
Contributor

@oquenchil oquenchil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bazel-io bazel-io closed this in 0cb8757 Nov 11, 2020
@keith keith deleted the ks/switch-to--fdebug-compilation-dir branch November 11, 2020 16:21
@soonho-tri
Copy link

@keith , I'm afraid that this commit causes a compilation error in macOS-14:

  • AFAIK, the latest Xcode we can use in macOS-14 is Xcode 11.2.1. It ships Apple clang version 11.0.0 (clang-1100.0.33.12).
  • Apple clang version 11.0.0 (clang-1100.0.33.12) corresponds to LLVM clang-8.0.0 (see here).

I think it explains the CI failure in Homebrew/homebrew-core#69466 (bump to bazel-4.0.0)

ERROR: /private/tmp/bazel-20210121-22298-3itmz5/sources/third_party/ijar/BUILD:72:10: Compiling third_party/ijar/zip_main.cc failed: (Exit 1): wrapped_clang failed: error executing command 
  (cd /private/tmp/bazel_9Po2zcX3/out/execroot/io_bazel && \
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=10.15 \
    PATH=/usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/[email protected]/bin:/usr/local/opt/openjdk@11/bin:/usr/bin:/bin:/usr/sbin:/sbin \
    XCODE_VERSION_OVERRIDE=11.3.1.11C504 \
  external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG '-DNS_BLOCK_ASSERTIONS=1' '-std=c++11' -fdebug-compilation-dir . -iquote . -iquote bazel-out/darwin-opt/bin -iquote external/bazel_tools -iquote bazel-out/darwin-opt/bin/external/bazel_tools -isystem third_party/zlib -isystem bazel-out/darwin-opt/bin/third_party/zlib -MD -MF bazel-out/darwin-opt/bin/third_party/ijar/_objs/zipper/zip_main.d -DBLAZE_OPENSOURCE '-frandom-seed=bazel-out/darwin-opt/bin/third_party/ijar/_objs/zipper/zip_main.o' -isysroot __BAZEL_XCODE_SDKROOT__ -F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks -F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/MacOSX.platform/Developer/Library/Frameworks '-mmacosx-version-min=10.15' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c third_party/ijar/zip_main.cc -o bazel-out/darwin-opt/bin/third_party/ijar/_objs/zipper/zip_main.o)
Execution platform: //:default_host_platform
[21 / 75] 3 actions running
    Executing genrule //src/tools/xcode/realpath:realpath_genrule; 0s local
    Executing genrule //.../xcode/stdredirect:stdredirect_genrule; 0s local
    Compiling third_party/ijar/zip.cc; 0s local

clang: error: unknown argument: '-fdebug-compilation-dir'

keith added a commit to keith/bazel that referenced this pull request Jan 22, 2021
This reverts commit 0cb8757.

This flag isn't supported by Xcode 11.2, which is the newest available
version for macOS 10.14

bazelbuild#12354 (comment)
@keith
Copy link
Member Author

keith commented Jan 22, 2021

Sorry for the trouble, thanks for the report! here's a revert #12882

@soonho-tri
Copy link

Thanks for the update!

bazel-io pushed a commit that referenced this pull request Feb 2, 2021
This reverts commit 0cb8757.

This flag isn't supported by Xcode 11.2, which is the newest available
version for macOS 10.14

#12354 (comment)

Fixes #12905

Closes #12882.

PiperOrigin-RevId: 355126529
arunkumar9t2 pushed a commit to arunkumar9t2/bazel that referenced this pull request Feb 9, 2021
This reverts commit 0cb8757.

This flag isn't supported by Xcode 11.2, which is the newest available
version for macOS 10.14

bazelbuild#12354 (comment)

Fixes bazelbuild#12905

Closes bazelbuild#12882.

PiperOrigin-RevId: 355126529
philwo pushed a commit that referenced this pull request Mar 15, 2021
This reverts commit 0cb8757.

This flag isn't supported by Xcode 11.2, which is the newest available
version for macOS 10.14

#12354 (comment)

Fixes #12905

Closes #12882.

PiperOrigin-RevId: 355126529
philwo pushed a commit that referenced this pull request Mar 15, 2021
This reverts commit 0cb8757.

This flag isn't supported by Xcode 11.2, which is the newest available
version for macOS 10.14

#12354 (comment)

Fixes #12905

Closes #12882.

PiperOrigin-RevId: 355126529
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants