Skip to content

Commit 4bdb505

Browse files
committed
[Driver] Support for compressed debug info on Fuchsia
Pass the --compress-debug-sections=zlib argument to the linker when the use of compressed debug info is requested. Differential Revision: https://reviews.llvm.org/D114115
1 parent 8c49ab0 commit 4bdb505

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

clang/lib/Driver/ToolChains/Fuchsia.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA,
127127
D.getLTOMode() == LTOK_Thin);
128128
}
129129

130+
addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs);
130131
AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
131132

132133
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs,

clang/test/Driver/compress.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
// RUN: %clang -### -target x86_64-unknown-linux-gnu -gz=zlib -x assembler %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
2727
// RUN: %clang -### -target x86_64-unknown-linux-gnu -gz=zlib %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
2828
// RUN: %clang -### -target x86_64-unknown-freebsd -gz=zlib %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
29+
// RUN: %clang -### -target x86_64-unknown-fuchsia -gz=zlib %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
2930
// CHECK-OPT_GZ_EQ_ZLIB: {{.* "-cc1(as)?".* "--compress-debug-sections=zlib"}}
3031
// CHECK-OPT_GZ_EQ_ZLIB: "--compress-debug-sections=zlib"
3132

0 commit comments

Comments
 (0)