Skip to content

Commit

Permalink
Switch to -fdebug-compilation-dir
Browse files Browse the repository at this point in the history
This removes some argument parsing from wrapped_clang. This flag was
introduced in clang 9.

Closes bazelbuild#12354.

PiperOrigin-RevId: 341833675
  • Loading branch information
keith authored and copybara-github committed Nov 11, 2020
1 parent 1c40d14 commit 0cb8757
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
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 @@ -5371,7 +5371,7 @@ def _impl(ctx):
ACTION_NAMES.objc_compile,
ACTION_NAMES.objcpp_compile,
],
flag_groups = [flag_group(flags = ["DEBUG_PREFIX_MAP_PWD=."])],
flag_groups = [flag_group(flags = ["-fdebug-compilation-dir", "."])],
),
],
)
Expand Down
3 changes: 0 additions & 3 deletions tools/osx/crosstool/wrapped_clang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ int main(int argc, char *argv[]) {
std::ofstream bitcode_symbol_map_file(bitcode_symbol_map);
arg = bitcode_symbol_map;
}
if (SetArgIfFlagPresent(arg, "DEBUG_PREFIX_MAP_PWD", &dest_dir)) {
arg = "-fdebug-prefix-map=" + std::string(cwd.get()) + "=" + dest_dir;
}
if (arg.compare("OSO_PREFIX_MAP_PWD") == 0) {
arg = "-Wl,-oso_prefix," + std::string(cwd.get()) + "/";
}
Expand Down

0 comments on commit 0cb8757

Please sign in to comment.