Move ccache
This commit is contained in:
parent
2e97c61005
commit
a79f4565a9
@ -8,8 +8,8 @@ rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/
|
||||
mkdir -p implementations/tdlight/build implementations/tdlight/build/td_bin/bin implementations/tdlight/td_tools_build/java/it/tdlight/jni api/src/main/java-legacy/it/tdlight/jni api/src/main/java-sealed/it/tdlight/jni natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
|
||||
|
||||
# Default compiler
|
||||
export CMAKE_C_COMPILER="/usr/bin/ccache /usr/bin/clang-10"
|
||||
export CMAKE_CXX_COMPILER="/usr/bin/ccache /usr/bin/clang++-10"
|
||||
export CMAKE_C_COMPILER="/usr/bin/clang-10"
|
||||
export CMAKE_CXX_COMPILER="/usr/bin/clang++-10"
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
|
@ -8,8 +8,8 @@ rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/
|
||||
mkdir -p implementations/tdlight/build implementations/tdlight/build/td_bin/bin implementations/tdlight/td_tools_build/java/it/tdlight/jni api/src/main/java-legacy/it/tdlight/jni api/src/main/java-sealed/it/tdlight/jni natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
|
||||
|
||||
# Default compiler
|
||||
export CMAKE_C_COMPILER="/usr/bin/ccache /usr/bin/clang-14"
|
||||
export CMAKE_CXX_COMPILER="/usr/bin/ccache /usr/bin/clang++-14"
|
||||
export CMAKE_C_COMPILER="/usr/bin/clang-14"
|
||||
export CMAKE_CXX_COMPILER="/usr/bin/clang++-14"
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
|
@ -9,8 +9,8 @@ rm -rf implementations/tdlight/td_tools_build implementations/tdlight/build api/
|
||||
mkdir -p implementations/tdlight/build implementations/tdlight/build/td_bin/bin implementations/tdlight/td_tools_build/java/it/tdlight/jni api/src/main/java-legacy/it/tdlight/jni api/src/main/java-sealed/it/tdlight/jni natives/src/main/java/it/tdlight/jni natives/build natives/tdjni_bin natives/tdjni_docs
|
||||
|
||||
# Default compiler
|
||||
export CMAKE_C_COMPILER="/usr/bin/ccache /usr/bin/clang-10"
|
||||
export CMAKE_CXX_COMPILER="/usr/bin/ccache /usr/bin/clang++-10"
|
||||
export CMAKE_C_COMPILER="/usr/bin/clang-10"
|
||||
export CMAKE_CXX_COMPILER="/usr/bin/clang++-10"
|
||||
|
||||
# Build tdlib tools
|
||||
cd implementations/tdlight/td_tools_build
|
||||
|
@ -1,7 +1,7 @@
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
|
||||
set(CMAKE_C_COMPILER "/usr/bin/ccache /usr/bin/clang-10")
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/ccache /usr/bin/clang++-10")
|
||||
set(CMAKE_C_COMPILER "/usr/bin/clang-10")
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/clang++-10")
|
||||
set(CMAKE_AR /usr/bin/llvm-ar-10)
|
||||
|
||||
# Set various compiler flags
|
||||
@ -11,3 +11,10 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++
|
||||
|
||||
# Use LLD on linux
|
||||
add_link_options("-fuse-ld=lld")
|
||||
|
||||
# ccache
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) # Less useful to do it for linking, see edit2
|
||||
endif(CCACHE_FOUND)
|
||||
|
@ -1,7 +1,7 @@
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
|
||||
set(CMAKE_C_COMPILER "/usr/bin/ccache /usr/bin/clang-14")
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/ccache /usr/bin/clang++-14")
|
||||
set(CMAKE_C_COMPILER "/usr/bin/clang-14")
|
||||
set(CMAKE_CXX_COMPILER "/usr/bin/clang++-14")
|
||||
set(CMAKE_AR /usr/bin/llvm-ar-14)
|
||||
|
||||
# Set various compiler flags
|
||||
@ -11,3 +11,10 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++
|
||||
|
||||
# Use LLD on linux
|
||||
add_link_options("-fuse-ld=lld")
|
||||
|
||||
# ccache
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) # Less useful to do it for linking, see edit2
|
||||
endif(CCACHE_FOUND)
|
||||
|
@ -50,3 +50,10 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
# Use LLD on linux
|
||||
#add_link_options("-fuse-ld=lld" "-rtlib=compiler-rt" "-unwindlib=libunwind" "-Wl,--as-needed")
|
||||
add_link_options("-fuse-ld=lld" "-v")
|
||||
|
||||
# ccache
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) # Less useful to do it for linking, see edit2
|
||||
endif(CCACHE_FOUND)
|
||||
|
Loading…
x
Reference in New Issue
Block a user