backend/build: improve LLVM link options

Update options according to llvm-config:

* delete "--stdlib=libc++"  (it seems to provoke runtime link errors on Linux)
* remove "-lffi" (it doesn't seem to be required)
* remove "-lc++" on macOS

Also move Linux system libs options to llvm.def (as for macOS)
This commit is contained in:
Svyatoslav Scherbina
2016-11-14 12:01:18 +07:00
committed by SvyatoslavScherbina
parent d1a303bb25
commit 3d36973022
3 changed files with 53 additions and 46 deletions
+3 -2
View File
@@ -8,7 +8,7 @@ compilerOpts = -std=c99 -fPIC \
linker = clang++
linkerOpts = -stdlib=libc++ -fPIC -fvisibility-inlines-hidden \
linkerOpts = -fPIC -fvisibility-inlines-hidden \
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers \
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor \
-std=c++11 \
@@ -19,4 +19,5 @@ linkerOpts.osx = \
-lpthread -lz -lm -lcurses
linkerOpts.linux=\
-Wl,-z,noexecstack
-Wl,-z,noexecstack \
-lrt -ldl -lpthread -lz -lm