Building Firefox/SURF: Difference between revisions

Line 153: Line 153:
Then we can find [https://searchfox.org/mozilla-central/source/taskcluster/scripts/misc/build-clang.sh build-clang.sh] - it looks like most of the heavy lifting is done by a script called [https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.py build-clang.py].  We can also find [https://searchfox.org/mozilla-central/source/build/build-clang/clang-linux64.json clang-linux64.json].  Of special note, is that the json file specifies where to find the compiler to compile clang, as well as patches to apply to clang before compiling it.  (It might be simpler for you to point the source code fetch to your own repo, rather than adding patches in the json file though.)
Then we can find [https://searchfox.org/mozilla-central/source/taskcluster/scripts/misc/build-clang.sh build-clang.sh] - it looks like most of the heavy lifting is done by a script called [https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.py build-clang.py].  We can also find [https://searchfox.org/mozilla-central/source/build/build-clang/clang-linux64.json clang-linux64.json].  Of special note, is that the json file specifies where to find the compiler to compile clang, as well as patches to apply to clang before compiling it.  (It might be simpler for you to point the source code fetch to your own repo, rather than adding patches in the json file though.)


So -using permanent links to a mozilla-central repo as of 11/4/2019 - the steps to build a compiler to compile Firefox with are
So - using permanent links to a mozilla-central repo as of 11/4/2019 - the steps to build a compiler to compile Firefox with are


# [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/taskcluster/ci/fetch/toolchains.yml#411-416 Download the clang source code as specified here]
# [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/taskcluster/ci/fetch/toolchains.yml#411-416 Download the clang source code as specified here]
Line 160: Line 160:
## We patch the clang source code using the patches specified in the json file before building it.
## We patch the clang source code using the patches specified in the json file before building it.
# We build the linux64 debug job [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/taskcluster/ci/build/linux.yml#113-147 using the job specified here] (which defines what toolchains to use) and the we use [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/browser/config/mozconfigs/linux64/debug the mozconfig specified here].
# We build the linux64 debug job [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/taskcluster/ci/build/linux.yml#113-147 using the job specified here] (which defines what toolchains to use) and the we use [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/browser/config/mozconfigs/linux64/debug the mozconfig specified here].
## IF we follow the mozconfig include tree, we find that [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/build/unix/mozconfig.unix mozconfig.unix] is where we set the CC and CXX variables.  
## If we follow the mozconfig include tree, we find that [https://searchfox.org/mozilla-central/rev/3300072e993ae05d50d5c63d815260367eaf9179/build/unix/mozconfig.unix mozconfig.unix] is where we set the CC and CXX variables.  


Modifying components of those steps is how you'd customize the compiler used to build Firefox.
Modifying components of those steps is how you'd customize the compiler used to build Firefox.
124

edits