Skip to content

Commit

Permalink
Bug 1720820 - Remove python executable configuration from clang build…
Browse files Browse the repository at this point in the history
… script. r=firefox-build-system-reviewers,andi

Clang >= 11 ignores PYTHON_EXECUTABLE entirely (and uses python3, which
is not even what we pass, but that's actually fine), and all the build
tasks we have on older versions find the python executable they need on
their own.

Differential Revision: https://phabricator.services.mozilla.com/D120049
  • Loading branch information
glandium committed Jul 17, 2021
1 parent 7482cf7 commit 6a42db4
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 31 deletions.
1 change: 0 additions & 1 deletion build/build-clang/README
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Config file format
build-clang.py accepts a JSON config format with the following fields:

* stages: Use 1, 2, 3 or 4 to select different compiler stages. The default is 3.
* python_path: Path to the Python 2.7 installation on the machine building clang.
* cc: Path to the bootsraping C Compiler.
* cxx: Path to the bootsraping C++ Compiler.
* as: Path to the assembler tool.
Expand Down
10 changes: 0 additions & 10 deletions build/build-clang/build-clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ def build_one_stage(
osx_cross_compile,
build_type,
assertions,
python_path,
libcxx_include_dir,
build_wasm,
compiler_rt_source_dir=None,
Expand Down Expand Up @@ -263,7 +262,6 @@ def cmake_base_args(cc, cxx, asm, ld, ar, ranlib, libtool, inst_dir):
"-DCMAKE_INSTALL_PREFIX=%s" % inst_dir,
"-DLLVM_TARGETS_TO_BUILD=%s" % machine_targets,
"-DLLVM_ENABLE_ASSERTIONS=%s" % ("ON" if assertions else "OFF"),
"-DPYTHON_EXECUTABLE=%s" % slashify_path(python_path),
"-DLLVM_TOOL_LIBCXX_BUILD=%s" % ("ON" if build_libcxx else "OFF"),
"-DLLVM_ENABLE_BINDINGS=OFF",
]
Expand Down Expand Up @@ -711,10 +709,6 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
assertions = config["assertions"]
if assertions not in (True, False):
raise ValueError("Only boolean values are accepted for assertions.")
python_path = None
if "python_path" not in config:
raise ValueError("Config file needs to set python_path")
python_path = config["python_path"]
ndk_dir = None
android_targets = None
if "android_targets" in config:
Expand Down Expand Up @@ -884,7 +878,6 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
osx_cross_compile,
build_type,
assertions,
python_path,
libcxx_include_dir,
build_wasm,
is_final_stage=(stages == 1),
Expand Down Expand Up @@ -913,7 +906,6 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
osx_cross_compile,
build_type,
assertions,
python_path,
libcxx_include_dir,
build_wasm,
compiler_rt_source_dir,
Expand Down Expand Up @@ -945,7 +937,6 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
osx_cross_compile,
build_type,
assertions,
python_path,
libcxx_include_dir,
build_wasm,
compiler_rt_source_dir,
Expand Down Expand Up @@ -986,7 +977,6 @@ def prune_final_dir_for_clang_tidy(final_dir, osx_cross_compile):
osx_cross_compile,
build_type,
assertions,
python_path,
libcxx_include_dir,
build_wasm,
compiler_rt_source_dir,
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-10-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"build_wasm": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-11-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-11-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"build_wasm": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-11-macosx64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_type": "Release",
"assertions": false,
"osx_cross_compile": true,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-11-win64-2stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_libcxx": false,
"build_type": "Release",
"assertions": false,
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-11-win64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_libcxx": false,
"build_type": "Release",
"assertions": false,
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-12-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-12-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"build_wasm": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-12-macosx64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_type": "Release",
"assertions": false,
"osx_cross_compile": true,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-12-mingw.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-12-win64-2stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_libcxx": false,
"build_type": "Release",
"assertions": false,
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-12-win64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_libcxx": false,
"build_type": "Release",
"assertions": false,
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-5.0-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-7-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"build_libcxx": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"build_wasm": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-external-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_type": "Release",
"assertions": false,
"build_clang_tidy": true,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_type": "Release",
"assertions": false,
"build_clang_tidy": true,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-macosx64.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"assertions": false,
"build_clang_tidy": true,
"osx_cross_compile": true,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-tidy-win64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_type": "Release",
"assertions": false,
"build_clang_tidy": true,
"python_path": "c:/mozilla-build/python/python.exe",
"cc": "cl.exe",
"cxx": "cl.exe",
"ml": "ml64.exe",
Expand Down
1 change: 0 additions & 1 deletion build/build-clang/clang-trunk-linux64.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"build_wasm": true,
"build_type": "Release",
"assertions": false,
"python_path": "/usr/bin/python2.7",
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
Expand Down

0 comments on commit 6a42db4

Please sign in to comment.