[PATCH] D97752: Fix -gz=zlib options for linker for FreeBSD too

Ed Maste via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 2 05:45:47 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG462cf39a5c18: [Driver] Fix -gz=zlib options for linker also on FreeBSD (authored by emaste).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97752/new/

https://reviews.llvm.org/D97752

Files:
  clang/lib/Driver/ToolChains/FreeBSD.cpp
  clang/test/Driver/compress.c


Index: clang/test/Driver/compress.c
===================================================================
--- clang/test/Driver/compress.c
+++ clang/test/Driver/compress.c
@@ -25,6 +25,7 @@
 
 // RUN: %clang -### -target x86_64-unknown-linux-gnu -gz=zlib -x assembler %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
 // RUN: %clang -### -target x86_64-unknown-linux-gnu -gz=zlib %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
+// RUN: %clang -### -target x86_64-unknown-freebsd -gz=zlib %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s
 // CHECK-OPT_GZ_EQ_ZLIB: {{.* "-cc1(as)?".* "--compress-debug-sections=zlib"}}
 // CHECK-OPT_GZ_EQ_ZLIB: "--compress-debug-sections=zlib"
 
Index: clang/lib/Driver/ToolChains/FreeBSD.cpp
===================================================================
--- clang/lib/Driver/ToolChains/FreeBSD.cpp
+++ clang/lib/Driver/ToolChains/FreeBSD.cpp
@@ -290,6 +290,7 @@
 
   bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs);
   bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs);
+  addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs);
   AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
 
   if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97752.327421.patch
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210302/bb02c259/attachment.bin>


More information about the cfe-commits mailing list