mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-25 18:41:08 +00:00
Don't build dlopen when building for Windows
Windows doesn't have dlopen, not even Linux emulation environments such as MinGW. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
71fcb3c994
commit
507c787b44
|
@ -61,6 +61,18 @@ ifdef ZLIB
|
||||||
LOCAL_LDFLAGS += -lz
|
LOCAL_LDFLAGS += -lz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Only build the dlopen test in shared library builds, and not when building
|
||||||
|
# for Windows.
|
||||||
|
ifdef BUILD_DLOPEN
|
||||||
|
# Don't override the value
|
||||||
|
else ifdef WINDOWS_BUILD
|
||||||
|
BUILD_DLOPEN =
|
||||||
|
else ifdef SHARED
|
||||||
|
BUILD_DLOPEN = y
|
||||||
|
else
|
||||||
|
BUILD_DLOPEN =
|
||||||
|
endif
|
||||||
|
|
||||||
APPS = \
|
APPS = \
|
||||||
aes/crypt_and_hash$(EXEXT) \
|
aes/crypt_and_hash$(EXEXT) \
|
||||||
hash/generic_sum$(EXEXT) \
|
hash/generic_sum$(EXEXT) \
|
||||||
|
@ -120,7 +132,7 @@ ifdef PTHREAD
|
||||||
APPS += ssl/ssl_pthread_server$(EXEXT)
|
APPS += ssl/ssl_pthread_server$(EXEXT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef SHARED
|
ifdef BUILD_DLOPEN
|
||||||
APPS += test/dlopen
|
APPS += test/dlopen
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -328,7 +340,7 @@ test/cpp_dummy_build$(EXEXT): test/cpp_dummy_build.cpp $(DEP)
|
||||||
echo " CXX test/cpp_dummy_build.cpp"
|
echo " CXX test/cpp_dummy_build.cpp"
|
||||||
$(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
$(CXX) $(LOCAL_CXXFLAGS) $(CXXFLAGS) test/cpp_dummy_build.cpp $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
ifdef SHARED
|
ifdef BUILD_DLOPEN
|
||||||
test/dlopen$(EXEXT): test/dlopen.c $(DEP)
|
test/dlopen$(EXEXT): test/dlopen.c $(DEP)
|
||||||
echo " CC test/dlopen.c"
|
echo " CC test/dlopen.c"
|
||||||
# Do not link any test objects (that would bring in a static dependency on
|
# Do not link any test objects (that would bring in a static dependency on
|
||||||
|
|
|
@ -35,7 +35,8 @@ if(TEST_CPP)
|
||||||
target_link_libraries(cpp_dummy_build ${mbedcrypto_target})
|
target_link_libraries(cpp_dummy_build ${mbedcrypto_target})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_SHARED_MBEDTLS_LIBRARY)
|
if(USE_SHARED_MBEDTLS_LIBRARY AND
|
||||||
|
NOT ${CMAKE_SYSTEM_NAME} MATCHES "[Ww][Ii][Nn]")
|
||||||
add_executable(dlopen "dlopen.c")
|
add_executable(dlopen "dlopen.c")
|
||||||
target_include_directories(dlopen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
|
target_include_directories(dlopen PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../include)
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
|
Loading…
Reference in a new issue