mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-14 23:07:48 -04:00
just remember to use update-alternatives or symlink ld.gold -> ld, llvm-{ar,nm,ranlib}-{version} to their respective {ar,nm,ranlib} paths, and clang(++)-{version} to clang and clang++
This commit is contained in:
+8
-5
@@ -86,16 +86,19 @@ elseif(UNIX)
|
||||
-fno-threadsafe-statics -fslp-vectorize-aggressive -fslp-vectorize \
|
||||
-fno-stack-protector -fstrict-enums -fno-spell-checking \
|
||||
-fno-coverage-mapping -fstrict-vtable-pointers -finline-functions \
|
||||
-finline-hint-functions -fshort-enums -fno-unroll-loops")
|
||||
|
||||
-finline-hint-functions -fshort-enums -fno-unroll-loops \
|
||||
-flto -fwhole-program-vtables")
|
||||
|
||||
# these only work on 3.9+ -finline-functions -finline-hint-functions
|
||||
# these only work on 3.8+ -fno-coverage-mapping -fstrict-vtable-pointers
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
# O3 and Ofast include one or more flags that cause java to crash when using gcc6
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-signed-zeros -freciprocal-math -fno-unroll-loops -fno-tree-loop-optimize")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-signed-zeros -freciprocal-math \
|
||||
-fno-unroll-loops -fno-tree-loop-optimize \
|
||||
-fabi-version=9 -fabi-compat-version=9")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -fabi-version=9 -fabi-compat-version=9")
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
|
||||
endif()
|
||||
@@ -105,7 +108,7 @@ elseif(UNIX)
|
||||
-msse -msse2 -msse3 -mmmx -m3dnow \
|
||||
-Wformat -Wno-overloaded-virtual -Wno-missing-braces -Wno-format \
|
||||
-Wno-write-strings -Wno-unknown-pragmas \
|
||||
-Wno-uninitialized -Wno-reorder -Wno-tautological-constant-out-of-range-compare")
|
||||
-Wno-uninitialized -Wno-reorder -Wno-tautological-constant-out-of-range-compare")
|
||||
|
||||
add_definitions(-DLINUX -D_REENTRANT -Dlinux -D_USING_STL -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -U_FORTIFY_SOURCE)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user