mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
Clean up and simplify existing mach bootstrap
- Default to interactive mode and remove the `--interactive` flag - Use `--force` to skip interactivity - Change MSVC dependency storage organization on disk: put each version into its own folder and directly refer to the versioned folders, providing immutability and making the installation list redundant - Reuse `host_triple()` function to fix broken bootstrapper dispatching - Simplify code: - Remove or inline many unused and redudant functions and variables - Prefer plain functions to classes - Consolidate into fewer files, remove unnecessary bootstrapper/ dir - Improve Python style - Sort dependency list
This commit is contained in:
parent
ef900cbdcb
commit
60a1503b29
9 changed files with 137 additions and 281 deletions
|
@ -19,12 +19,12 @@ from subprocess import PIPE
|
|||
import sys
|
||||
import tarfile
|
||||
|
||||
from mach.registrar import Registrar
|
||||
import toml
|
||||
|
||||
from mach.registrar import Registrar
|
||||
from servo.packages import WINDOWS_MSVC as msvc_deps
|
||||
from servo.util import host_triple
|
||||
|
||||
|
||||
BIN_SUFFIX = ".exe" if sys.platform == "win32" else ""
|
||||
|
||||
|
||||
|
@ -384,14 +384,18 @@ class CommandBase(object):
|
|||
if "msvc" in (target or host_triple()):
|
||||
msvc_x64 = "64" if "x86_64" in (target or host_triple()) else ""
|
||||
msvc_deps_dir = path.join(self.context.sharedir, "msvc-dependencies")
|
||||
extra_path += [path.join(msvc_deps_dir, "cmake", "bin")]
|
||||
extra_path += [path.join(msvc_deps_dir, "ninja", "bin")]
|
||||
|
||||
def package_dir(package):
|
||||
return path.join(msvc_deps_dir, package, msvc_deps[package])
|
||||
|
||||
extra_path += [path.join(package_dir("cmake"), "bin")]
|
||||
extra_path += [path.join(package_dir("ninja"), "bin")]
|
||||
# Link openssl
|
||||
env["OPENSSL_INCLUDE_DIR"] = path.join(msvc_deps_dir, "openssl", "include")
|
||||
env["OPENSSL_LIB_DIR"] = path.join(msvc_deps_dir, "openssl", "lib" + msvc_x64)
|
||||
env["OPENSSL_INCLUDE_DIR"] = path.join(package_dir("openssl"), "include")
|
||||
env["OPENSSL_LIB_DIR"] = path.join(package_dir("openssl"), "lib" + msvc_x64)
|
||||
env["OPENSSL_LIBS"] = "ssleay32MD:libeay32MD"
|
||||
# Link moztools
|
||||
env["MOZTOOLS_PATH"] = path.join(msvc_deps_dir, "moztools", "bin")
|
||||
env["MOZTOOLS_PATH"] = path.join(package_dir("moztools"), "bin")
|
||||
|
||||
if is_windows():
|
||||
if not os.environ.get("NATIVE_WIN32_PYTHON"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue