Skip to content

Commit d412b14

Browse files
committed
Add ccache to travis.sh and fix python command call
1 parent 4abb9aa commit d412b14

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pkgman/installers/unix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ def unix_installer_cmake(properties):
123123
if os.environ.get("CMAKE_CXX_COMPILER") is not None:
124124
os.environ["CXX"] = os.environ["CMAKE_CXX_COMPILER"]
125125

126-
enable_ccache = ""
126+
enable_ccache = None
127127
if properties["ccache"]:
128128
set_ccache_compiler()
129129
enable_ccache = "--enable-ccache"
130130

131-
if not run_program("Running the bootstrap script...", ["./bootstrap", "--verbose", enable_ccache, "--parallel=" + str(multiprocessing.cpu_count()), "--prefix=" + destination_path], source_folder, verbose=verbose_output):
131+
if not run_program("Running the bootstrap script...", ["./bootstrap", "--verbose", "--parallel=" + str(multiprocessing.cpu_count()), "--prefix=" + destination_path] + ([enable_ccache] if enable_ccache else []), source_folder, verbose=verbose_output):
132132
return False
133133

134134
if not run_program("Building the source code...", ["make", "-j" + str(multiprocessing.cpu_count())], source_folder, verbose=verbose_output):

travis.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ linux_build() {
126126
printf " > Launching the build script for CMake...\n"
127127

128128
printf "\n===\n"
129-
python3 pkgman.py --c_compiler=$(which clang) --cxx_compiler=$(which clang++) --verbose "--repository_path=${bootstrap_repository}" "--packages=cmake"
129+
python3 pkgman.py --use_ccache --c_compiler=$(which clang) --cxx_compiler=$(which clang++) --verbose "--repository_path=${bootstrap_repository}" "--packages=cmake"
130130
local pkgman_error=$?
131131
printf "===\n\n"
132132

@@ -138,7 +138,7 @@ linux_build() {
138138
printf " > Launching the build script for LLVM...\n"
139139

140140
printf "\n===\n"
141-
python3 pkgman.py --c_compiler=$(which clang) --cxx_compiler=$(which clang++) --exclude_libcxx --verbose "--additional_paths=${bootstrap_repository}/cmake/bin" "--repository_path=${bootstrap_repository}" "--packages=llvm"
141+
python3 pkgman.py --use_ccache --c_compiler=$(which clang) --cxx_compiler=$(which clang++) --exclude_libcxx --verbose "--additional_paths=${bootstrap_repository}/cmake/bin" "--repository_path=${bootstrap_repository}" "--packages=llvm"
142142
local pkgman_error=$?
143143
printf "===\n\n"
144144

@@ -181,7 +181,7 @@ linux_build() {
181181
printf " > Re-launching the build script using the newly built clang...\n"
182182

183183
printf "\n===\n"
184-
python3 pkgman.py "--cxx_compiler=${bootstrap_repository}/llvm/bin/clang++" "--c_compiler=${bootstrap_repository}/llvm/bin/clang" --verbose "--additional_paths=${bootstrap_repository}/cmake/bin:${bootstrap_repository}/llvm/bin:${custom_bin_path}" "--repository_path=${library_repository}" "--packages=cmake,capstone,google,xed,capnproto"
184+
python3 pkgman.py --use_ccache "--cxx_compiler=${bootstrap_repository}/llvm/bin/clang++" "--c_compiler=${bootstrap_repository}/llvm/bin/clang" --verbose "--additional_paths=${bootstrap_repository}/cmake/bin:${bootstrap_repository}/llvm/bin:${custom_bin_path}" "--repository_path=${library_repository}" "--packages=cmake,capstone,google,xed,capnproto"
185185
local pkgman_error=$?
186186
printf "===\n\n"
187187

@@ -220,7 +220,7 @@ osx_build() {
220220
printf " > Launching the build script for CMake...\n"
221221

222222
printf "\n===\n"
223-
python3 pkgman.py --verbose "--repository_path=${bootstrap_repository}" "--packages=cmake"
223+
python3 pkgman.py --verbose --use_ccache "--repository_path=${bootstrap_repository}" "--packages=cmake"
224224
local pkgman_error=$?
225225
printf "===\n\n"
226226

@@ -232,7 +232,7 @@ osx_build() {
232232
printf " > Launching the build script for LLVM...\n"
233233

234234
printf "\n===\n"
235-
python3 pkgman.py --verbose "--additional_paths=${bootstrap_repository}/cmake/bin" "--use_ccache" "--repository_path=${library_repository}" "--packages=llvm"
235+
python3 pkgman.py --verbose --use_ccache "--additional_paths=${bootstrap_repository}/cmake/bin" "--use_ccache" "--repository_path=${library_repository}" "--packages=llvm"
236236
local pkgman_error=$?
237237
printf "===\n\n"
238238

@@ -275,7 +275,7 @@ osx_build() {
275275
printf " > Re-launching the build script using the newly built clang...\n"
276276

277277
printf "\n===\n"
278-
python3 pkgman.py "--cxx_compiler=${library_repository}/llvm/bin/clang++" "--c_compiler=${library_repository}/llvm/bin/clang" --verbose "--additional_paths=${bootstrap_repository}/cmake/bin:${library_repository}/llvm/bin:${custom_bin_path}" "--repository_path=${library_repository}" "--packages=cmake,capstone,google,xed,capnproto"
278+
python3 pkgman.py --use_ccache "--cxx_compiler=${library_repository}/llvm/bin/clang++" "--c_compiler=${library_repository}/llvm/bin/clang" --verbose "--additional_paths=${bootstrap_repository}/cmake/bin:${library_repository}/llvm/bin:${custom_bin_path}" "--repository_path=${library_repository}" "--packages=cmake,capstone,google,xed,capnproto"
279279
local pkgman_error=$?
280280
printf "===\n\n"
281281

0 commit comments

Comments
 (0)