summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/Driver/Driver.map4
-rw-r--r--clang/Driver/Makefile4
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/Driver/Driver.map b/clang/Driver/Driver.map
new file mode 100644
index 00000000000..43e310e053e
--- /dev/null
+++ b/clang/Driver/Driver.map
@@ -0,0 +1,4 @@
+{
+ global: main;
+ local: *;
+};
diff --git a/clang/Driver/Makefile b/clang/Driver/Makefile
index d4b939052c9..51943d5f27f 100644
--- a/clang/Driver/Makefile
+++ b/clang/Driver/Makefile
@@ -14,6 +14,10 @@ ifeq ($(OS),Darwin)
LD.Flags += -Wl,-exported_symbol -Wl,_main
endif
+ifeq ($(OS),Linux)
+LD.Flags += -Wl,--version-script=Driver.map
+endif
+
LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitreader bitwriter codegen ipo selectiondag
USEDLIBS = clangCodeGen.a clangAnalysis.a clangRewrite.a clangSema.a \
clangDriver.a clangAST.a clangParse.a clangLex.a \
OpenPOWER on IntegriCloud