Do not enable -fPIC when compiling on Windows (#1280)
Regardless of the compiler, Windows targets do not support -fPIC, as position independent code is already implicitly enabled. Compiling simdjson with Clang on Windows will error because -fPIC is an unsupported option for target 'x86_64-pc-windows-msvc'.
This commit is contained in:
parent
47669566da
commit
b3a26fd0cc
|
@ -89,7 +89,9 @@ if(SIMDJSON_VISUAL_STUDIO_BUILD_WITH_DEBUG_INFO_FOR_PROFILING)
|
|||
target_compile_options(simdjson-flags INTERFACE /Zi)
|
||||
endif()
|
||||
else()
|
||||
target_compile_options(simdjson-internal-flags INTERFACE -fPIC)
|
||||
if(NOT WIN32)
|
||||
target_compile_options(simdjson-internal-flags INTERFACE -fPIC)
|
||||
endif()
|
||||
target_compile_options(simdjson-internal-flags INTERFACE -Werror -Wall -Wextra -Weffc++)
|
||||
target_compile_options(simdjson-internal-flags INTERFACE -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue