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
main
Yueh-Hsuan Chiang 10 years ago
parent 674b1181cf
commit 0b1ffe2e1d
  1. 2
      Makefile
  2. 2
      build_tools/build_detect_platform

@ -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

@ -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

Loading…
Cancel
Save