-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #837 from loki-project/dev
merge dev into master for 0.5.2
- Loading branch information
Showing
47 changed files
with
154 additions
and
8,397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
if(NOT STATIC_LINK_RUNTIME) | ||
return() | ||
endif() | ||
|
||
# not supported on Solaris - system libraries are not available as archives | ||
# LTO is supported only for native builds | ||
if(SOLARIS) | ||
link_libraries( -static-libstdc++ -static-libgcc ) | ||
return() | ||
endif() | ||
|
||
if(NOT CMAKE_CROSSCOMPILING) | ||
add_compile_options(-static -flto) | ||
else() | ||
add_compile_options(-static) | ||
endif() | ||
|
||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
if(APPLE) | ||
link_libraries( -flto) | ||
else() | ||
link_libraries( -static -static-libstdc++ -pthread -flto ) | ||
endif() | ||
|
||
return() | ||
endif() | ||
|
||
if(NOT CMAKE_CROSSCOMPILING) | ||
# this is messing with release builds | ||
add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0) | ||
set(CMAKE_AR "gcc-ar") | ||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
set(CMAKE_C_ARCHIVE_FINISH "true") | ||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>") | ||
set(CMAKE_CXX_ARCHIVE_FINISH "true") | ||
link_libraries( -flto -static-libstdc++ -static-libgcc -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive ) | ||
else() | ||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" ) | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.