diff --git a/CMakeLists.txt b/CMakeLists.txt index ee8a8ee0..650fc0c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,15 +84,21 @@ elseif(UNIX) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast \ -fno-signed-zeros -freciprocal-math -ffp-contract=fast \ -fno-threadsafe-statics -fslp-vectorize-aggressive -fslp-vectorize \ - -fno-stack-protector -fstrict-enums -fstrict-vtable-pointers \ - -fno-coverage-mapping -fno-spell-checking -fshort-enums -finline-functions \ - -finline-hint-functions -fno-unroll-loops") + -fno-stack-protector -fstrict-enums -fno-spell-checking \ + -fno-coverage-mapping -fstrict-vtable-pointers -finline-functions \ + -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() @@ -102,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() diff --git a/engine/server/application/CommoditiesServer/src/CMakeLists.txt b/engine/server/application/CommoditiesServer/src/CMakeLists.txt index 8ba55ff9..fcdc03ec 100644 --- a/engine/server/application/CommoditiesServer/src/CMakeLists.txt +++ b/engine/server/application/CommoditiesServer/src/CMakeLists.txt @@ -1,4 +1,6 @@ +add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/CommoditiesServer.profdata) + set(SHARED_SOURCES shared/AuctionBid.cpp shared/AuctionBid.h diff --git a/engine/server/application/CommoditiesServer/src/linux/CommoditiesServer.profdata b/engine/server/application/CommoditiesServer/src/linux/CommoditiesServer.profdata new file mode 100644 index 00000000..42b16bcb Binary files /dev/null and b/engine/server/application/CommoditiesServer/src/linux/CommoditiesServer.profdata differ diff --git a/engine/server/application/ConnectionServer/src/CMakeLists.txt b/engine/server/application/ConnectionServer/src/CMakeLists.txt index 6737fd50..3ed472cf 100644 --- a/engine/server/application/ConnectionServer/src/CMakeLists.txt +++ b/engine/server/application/ConnectionServer/src/CMakeLists.txt @@ -1,4 +1,6 @@ +add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/ConnectionServer.profdata) + set(SHARED_SOURCES shared/CentralConnection.cpp shared/CentralConnection.h diff --git a/engine/server/application/ConnectionServer/src/linux/ConnectionServer.profdata b/engine/server/application/ConnectionServer/src/linux/ConnectionServer.profdata new file mode 100644 index 00000000..5642b9cf Binary files /dev/null and b/engine/server/application/ConnectionServer/src/linux/ConnectionServer.profdata differ diff --git a/engine/server/application/LoginServer/src/CMakeLists.txt b/engine/server/application/LoginServer/src/CMakeLists.txt index 147c47df..6a1c07e1 100644 --- a/engine/server/application/LoginServer/src/CMakeLists.txt +++ b/engine/server/application/LoginServer/src/CMakeLists.txt @@ -1,3 +1,5 @@ +add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/LoginServer.profdata) + set(SHARED_SOURCES shared/CentralServerConnection.cpp shared/CentralServerConnection.h diff --git a/engine/server/application/LoginServer/src/linux/LoginServer.profdata b/engine/server/application/LoginServer/src/linux/LoginServer.profdata new file mode 100644 index 00000000..bef02d34 Binary files /dev/null and b/engine/server/application/LoginServer/src/linux/LoginServer.profdata differ diff --git a/engine/server/application/PlanetServer/src/CMakeLists.txt b/engine/server/application/PlanetServer/src/CMakeLists.txt index e0eefd7a..21ceeab9 100644 --- a/engine/server/application/PlanetServer/src/CMakeLists.txt +++ b/engine/server/application/PlanetServer/src/CMakeLists.txt @@ -1,4 +1,6 @@ +add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/PlanetServer.profdata) + set(SHARED_SOURCES shared/CentralServerConnection.cpp shared/CentralServerConnection.h diff --git a/engine/server/application/PlanetServer/src/linux/PlanetServer.profdata b/engine/server/application/PlanetServer/src/linux/PlanetServer.profdata new file mode 100644 index 00000000..350e7a27 Binary files /dev/null and b/engine/server/application/PlanetServer/src/linux/PlanetServer.profdata differ diff --git a/game/server/application/SwgDatabaseServer/src/CMakeLists.txt b/game/server/application/SwgDatabaseServer/src/CMakeLists.txt index 776d387f..7e1c0131 100644 --- a/game/server/application/SwgDatabaseServer/src/CMakeLists.txt +++ b/game/server/application/SwgDatabaseServer/src/CMakeLists.txt @@ -1,4 +1,6 @@ +add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/SwgDatabaseServer.profdata) + set(SHARED_SOURCES shared/buffers/AuctionLocationsBuffer.cpp shared/buffers/AuctionLocationsBuffer.h diff --git a/game/server/application/SwgDatabaseServer/src/linux/SwgDatabaseServer.profdata b/game/server/application/SwgDatabaseServer/src/linux/SwgDatabaseServer.profdata new file mode 100644 index 00000000..63942cab Binary files /dev/null and b/game/server/application/SwgDatabaseServer/src/linux/SwgDatabaseServer.profdata differ diff --git a/game/server/application/SwgGameServer/src/CMakeLists.txt b/game/server/application/SwgGameServer/src/CMakeLists.txt index 8b7318ef..6da4fb55 100644 --- a/game/server/application/SwgGameServer/src/CMakeLists.txt +++ b/game/server/application/SwgGameServer/src/CMakeLists.txt @@ -1,4 +1,6 @@ +add_compile_options(-fprofile-instr-use=${PROJECT_SOURCE_DIR}/src/linux/SwgGameServer.profdata) + set(SHARED_SOURCES shared/combat/combat.def shared/combat/CombatEngine.cpp diff --git a/game/server/application/SwgGameServer/src/linux/SwgGameServer.profdata b/game/server/application/SwgGameServer/src/linux/SwgGameServer.profdata new file mode 100644 index 00000000..65914d37 Binary files /dev/null and b/game/server/application/SwgGameServer/src/linux/SwgGameServer.profdata differ