| | 311 | |
| | 312 | |
| | 313 | === icecc + ccache === |
| | 314 | |
| | 315 | So far, this only works well when using as compiler GCC, with clangs gives problems. |
| | 316 | |
| | 317 | To use icecc and ccache together the steps are: |
| | 318 | |
| | 319 | 1. Export the CCACHE_PREFIX variable: |
| | 320 | {{{ |
| | 321 | #!sh |
| | 322 | $ export CCACHE_PREFIX=icecc |
| | 323 | }}} |
| | 324 | 2. Set as first dir of your PATH the ccache dir. |
| | 325 | {{{ |
| | 326 | #!sh |
| | 327 | $ export PATH="/usr/lib/ccache:${PATH}" |
| | 328 | }}} |
| | 329 | |
| | 330 | |
| | 331 | === Tips for using icecc === |
| | 332 | |
| | 333 | * Increase the number of parallel jobs to the double or triple of your number of cores: |
| | 334 | {{{ |
| | 335 | #!sh |
| | 336 | $ export NUMBER_OF_PROCESSORS="$(( $(nproc) * 3 ))" |
| | 337 | }}} |
| | 338 | |
| | 339 | * To ensure that the slaves are going to use the exact same compiler version than your machine, send your toolchain to the build slaves: |
| | 340 | {{{ |
| | 341 | #!sh |
| | 342 | export ICECC_VERSION="$(pwd)/$(icecc --build-native|tee /dev/stderr|grep creating|awk '{print $2}')" |
| | 343 | }}} |
| | 344 | |
| | 345 | |
| | 346 | === using icecc with clang === |
| | 347 | |
| | 348 | This are the steps to use icecc with clang (without ccache because it don't works so far) |
| | 349 | |
| | 350 | 1. If you were using GCC previously, then start with a clean build. |
| | 351 | {{{ |
| | 352 | #!sh |
| | 353 | rm -fr WebKitBuild/Release |
| | 354 | }}} |
| | 355 | 2. Ensure that you have installed the symlinks to clang on the icecc dir |
| | 356 | {{{ |
| | 357 | #!sh |
| | 358 | cd /usr/lib/icecc/bin |
| | 359 | sudo ln -s $(which icecc) clang |
| | 360 | sudo ln -s $(which icecc) clang++ |
| | 361 | }}} |
| | 362 | 3. Export the CC and CXX environment variables accordingly: |
| | 363 | {{{ |
| | 364 | #!sh |
| | 365 | export CC=clang |
| | 366 | export CXX=clang++ |
| | 367 | }}} |
| | 368 | 4. Build a tgz with your clang toolchain: |
| | 369 | {{{ |
| | 370 | #!sh |
| | 371 | export ICECC_VERSION="$(pwd)/$(/usr/lib/icecc/icecc-create-env --clang /usr/bin/clang /usr/lib/icecc/compilerwrapper|tee /dev/stderr|grep creating|awk '{print $2}')" |
| | 372 | }}} |
| | 373 | 5. Export your PATH to include the icecc dir as first: |
| | 374 | {{{ |
| | 375 | #!sh |
| | 376 | export PATH="/usr/lib/icecc/bin:${PATH}" |
| | 377 | }}} |
| | 378 | 6. Ensure that the icecc daemon is running and start the compilation as usual. |
| | 379 | {{{ |
| | 380 | #!sh |
| | 381 | Tools/Scripts/build-webkit --gtk |
| | 382 | }}} |
| | 383 | |