Skip to content

Commit fa69b78

Browse files
keithcopybara-github
authored andcommitted
Add -g in per_object_debug_info for Clang 12 and GCC 11
Applies bazelbuild/rules_cc#115 here Fixes #14038 Closes #14084. PiperOrigin-RevId: 401468526
1 parent 2cdb647 commit fa69b78

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public static ImmutableList<CToolchain.Feature> getLegacyFeatures(
175175
" flag_group {",
176176
" expand_if_all_available: 'per_object_debug_info_file'",
177177
" flag: '-gsplit-dwarf'",
178+
" flag: '-g'",
178179
" }",
179180
" }")));
180181
}

src/test/java/com/google/devtools/build/lib/packages/util/mock/osx_cc_toolchain_config.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7590,7 +7590,7 @@ def _impl(ctx):
75907590
],
75917591
flag_groups = [
75927592
flag_group(
7593-
flags = ["-gsplit-dwarf"],
7593+
flags = ["-gsplit-dwarf", "-g"],
75947594
expand_if_available = "per_object_debug_info_file",
75957595
),
75967596
],

tools/cpp/unix_cc_toolchain_config.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def _impl(ctx):
386386
],
387387
flag_groups = [
388388
flag_group(
389-
flags = ["-gsplit-dwarf"],
389+
flags = ["-gsplit-dwarf", "-g"],
390390
expand_if_available = "per_object_debug_info_file",
391391
),
392392
],

tools/osx/crosstool/cc_toolchain_config.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ def _impl(ctx):
16741674
],
16751675
flag_groups = [
16761676
flag_group(
1677-
flags = ["-gsplit-dwarf"],
1677+
flags = ["-gsplit-dwarf", "-g"],
16781678
expand_if_available = "per_object_debug_info_file",
16791679
),
16801680
],

0 commit comments

Comments
 (0)