[clang] 9292ece - [clang driver] Spell "--export-dynamic-symbol" with two dashes.
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Sat May 23 15:48:41 PDT 2020
Author: Eli Friedman
Date: 2020-05-23T15:46:28-07:00
New Revision: 9292ece9956c98acf0cfa6e188316243ffbf4bed
URL: https://github.com/llvm/llvm-project/commit/9292ece9956c98acf0cfa6e188316243ffbf4bed
DIFF: https://github.com/llvm/llvm-project/commit/9292ece9956c98acf0cfa6e188316243ffbf4bed.diff
LOG: [clang driver] Spell "--export-dynamic-symbol" with two dashes.
This doesn't make a difference for linkers that support the option, but
it improves the error message from older linkers that don't support it.
Added:
Modified:
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/test/Driver/sanitizer-ld.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index d6451447a924..85a1a4e1ac07 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -774,7 +774,7 @@ bool tools::addSanitizerRuntimes(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back("--export-dynamic");
if (SanArgs.hasCrossDsoCfi() && !AddExportDynamic)
- CmdArgs.push_back("-export-dynamic-symbol=__cfi_check");
+ CmdArgs.push_back("--export-dynamic-symbol=__cfi_check");
return !StaticRuntimes.empty() || !NonWholeStaticRuntimes.empty();
}
diff --git a/clang/test/Driver/sanitizer-ld.c b/clang/test/Driver/sanitizer-ld.c
index 52a432ca1803..a3070d26d16c 100644
--- a/clang/test/Driver/sanitizer-ld.c
+++ b/clang/test/Driver/sanitizer-ld.c
@@ -571,7 +571,7 @@
// RUN: | FileCheck --check-prefix=CHECK-CFI-CROSS-DSO-DIAG-ANDROID %s
// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "{{.*}}ld{{(.exe)?}}"
// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "{{[^"]*}}libclang_rt.ubsan_standalone-aarch64-android.so"
-// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "-export-dynamic-symbol=__cfi_check"
+// CHECK-CFI-CROSS-DSO-DIAG-ANDROID: "--export-dynamic-symbol=__cfi_check"
// RUN: %clangxx -fsanitize=address %s -### -o %t.o 2>&1 \
// RUN: -mmacosx-version-min=10.6 \
More information about the cfe-commits
mailing list