mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-26 14:43:50 -04:00
build: Enable -fno-semantic-interposition for GCC
This matches the more optimized clang behavior for -fPIC
This commit is contained in:
parent
3456769703
commit
5475084717
@ -218,3 +218,10 @@ if(NOT MSVC)
|
||||
add_compile_options("-fvisibility=hidden")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
check_cxx_compiler_flag("-fno-semantic-interposition" COMPILER_SUPPORTS_FNO_SEMANTIC_INTERPOSITION)
|
||||
if(COMPILER_SUPPORTS_FNO_SEMANTIC_INTERPOSITION)
|
||||
add_compile_options("-fno-semantic-interposition")
|
||||
endif()
|
||||
endif()
|
||||
|
@ -1370,6 +1370,10 @@ def CompileCxx(obj,src,opts):
|
||||
if 'NOARCH:' + arch.upper() not in opts:
|
||||
cmd += " -arch %s" % arch
|
||||
|
||||
elif 'clang' not in GetCXX().split('/')[-1]:
|
||||
# Enable interprocedural optimizations in GCC.
|
||||
cmd += " -fno-semantic-interposition"
|
||||
|
||||
if "SYSROOT" in SDK:
|
||||
if GetTarget() != "android":
|
||||
cmd += ' --sysroot=%s' % (SDK["SYSROOT"])
|
||||
|
Loading…
x
Reference in New Issue
Block a user