[PATCH] D35582: [Driver] Always use -z rodynamic for Fuchsia
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 14:34:47 PDT 2017
phosek updated this revision to Diff 107185.
phosek marked an inline comment as done.
Repository:
rL LLVM
https://reviews.llvm.org/D35582
Files:
lib/Driver/ToolChains/Fuchsia.cpp
test/Driver/fuchsia.c
test/Driver/fuchsia.cpp
Index: test/Driver/fuchsia.cpp
===================================================================
--- test/Driver/fuchsia.cpp
+++ test/Driver/fuchsia.cpp
@@ -7,6 +7,7 @@
// CHECK: "-internal-isystem" "{{.*[/\\]}}x86_64-fuchsia{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1"
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
// CHECK: {{.*}}lld{{.*}}" "-flavor" "gnu"
+// CHECK: "-z" "rodynamic"
// CHECK: "--sysroot=[[SYSROOT]]"
// CHECK: "-pie"
// CHECK: "--build-id"
Index: test/Driver/fuchsia.c
===================================================================
--- test/Driver/fuchsia.c
+++ test/Driver/fuchsia.c
@@ -5,6 +5,7 @@
// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
// CHECK: {{.*}}lld{{.*}}" "-flavor" "gnu"
+// CHECK: "-z" "rodynamic"
// CHECK: "--sysroot=[[SYSROOT]]"
// CHECK: "-pie"
// CHECK: "--build-id"
Index: lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- lib/Driver/ToolChains/Fuchsia.cpp
+++ lib/Driver/ToolChains/Fuchsia.cpp
@@ -46,6 +46,9 @@
if (llvm::sys::path::stem(Exec).equals_lower("lld")) {
CmdArgs.push_back("-flavor");
CmdArgs.push_back("gnu");
+
+ CmdArgs.push_back("-z");
+ CmdArgs.push_back("rodynamic");
}
if (!D.SysRoot.empty())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35582.107185.patch
Type: text/x-patch
Size: 1348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170718/e2b773fc/attachment.bin>
More information about the cfe-commits
mailing list