Skip to content

Commit

Permalink
Revert "Switch to -fdebug-compilation-dir"
Browse files Browse the repository at this point in the history
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
  • Loading branch information
keith authored and copybara-github committed Feb 2, 2021
1 parent 28fc8a1 commit 58bb42a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/osx/crosstool/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5400,7 +5400,7 @@ def _impl(ctx):
ACTION_NAMES.objc_compile,
ACTION_NAMES.objcpp_compile,
],
flag_groups = [flag_group(flags = ["-fdebug-compilation-dir", "."])],
flag_groups = [flag_group(flags = ["DEBUG_PREFIX_MAP_PWD=."])],
),
],
)
Expand Down
3 changes: 3 additions & 0 deletions tools/osx/crosstool/wrapped_clang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ void ProcessArgument(const std::string arg, const std::string developer_dir,
}

std::string dest_dir, bitcode_symbol_map;
if (SetArgIfFlagPresent(arg, "DEBUG_PREFIX_MAP_PWD", &dest_dir)) {
new_arg = "-fdebug-prefix-map=" + cwd + "=" + dest_dir;
}
if (arg.compare("OSO_PREFIX_MAP_PWD") == 0) {
new_arg = "-Wl,-oso_prefix," + cwd + "/";
}
Expand Down

0 comments on commit 58bb42a

Please sign in to comment.