Remove -Wl,--no-as-needed flag when making shared_lib in OSX and IOS

Summary:
Remove -Wl,--no-as-needed flag when making shared_lib in OSX and IOS as
those environment doe not have compile option --no-as-needed

  ld: unknown option: --no-as-needed
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Test Plan: make shared_lib

Reviewers: meyering, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D40353
This commit is contained in:
Yueh-Hsuan Chiang 2015-06-23 16:32:59 -07:00
parent 674b1181cf
commit 0b1ffe2e1d
2 changed files with 2 additions and 2 deletions

View File

@ -349,7 +349,7 @@ endif
$(SHARED4):
$(CXX) $(PLATFORM_SHARED_LDFLAGS)$(SHARED3) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(LIB_SOURCES) \
-Wl,--no-as-needed $(LDFLAGS) -o $@
$(LDFLAGS) -o $@
endif # PLATFORM_SHARED_EXT

View File

@ -92,7 +92,7 @@ CROSS_COMPILE=
PLATFORM_CCFLAGS=
PLATFORM_LDFLAGS="$PLATFORM_LDFLAGS"
PLATFORM_SHARED_EXT="so"
PLATFORM_SHARED_LDFLAGS="-shared -Wl,-soname -Wl,"
PLATFORM_SHARED_LDFLAGS="-Wl,--no-as-needed -shared -Wl,-soname -Wl,"
PLATFORM_SHARED_CFLAGS="-fPIC"
PLATFORM_SHARED_VERSIONED=true