summaryrefslogtreecommitdiffstats
path: root/js/src/devtools/automation/autospider.py
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/devtools/automation/autospider.py')
-rwxr-xr-xjs/src/devtools/automation/autospider.py65
1 files changed, 34 insertions, 31 deletions
diff --git a/js/src/devtools/automation/autospider.py b/js/src/devtools/automation/autospider.py
index a49d2fd505..5e427fd3a5 100755
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -217,9 +217,40 @@ def ensure_dir_exists(
with open(os.path.join(DIR.scripts, "variants", args.variant)) as fh:
variant = json.load(fh)
+# Some of the variants request a particular word size (eg ARM simulators).
+word_bits = variant.get("bits")
+
+# On Linux and Windows, we build 32- and 64-bit versions on a 64 bit
+# host, so the caller has to specify what is desired.
+if word_bits is None and args.platform:
+ platform_arch = args.platform.split("-")[0]
+ if platform_arch in ("win32", "linux"):
+ word_bits = 32
+ elif platform_arch in ("win64", "linux64"):
+ word_bits = 64
+
+# Fall back to the word size of the host.
+if word_bits is None:
+ word_bits = 64 if platform.architecture()[0] == "64bit" else 32
+
+# Need a platform name to use as a key in variant files.
+if args.platform:
+ variant_platform = args.platform.split("-")[0]
+elif platform.system() == "Windows":
+ variant_platform = "win64" if word_bits == 64 else "win32"
+elif platform.system() == "Linux":
+ variant_platform = "linux64" if word_bits == 64 else "linux"
+elif platform.system() == "Darwin":
+ variant_platform = "macosx64"
+else:
+ variant_platform = "other"
+
CONFIGURE_ARGS = variant["configure-args"]
-compiler = variant.get("compiler")
+if variant_platform in ("win32", "win64"):
+ compiler = "clang-cl"
+else:
+ compiler = variant.get("compiler")
if compiler != "gcc" and "clang-plugin" not in CONFIGURE_ARGS:
CONFIGURE_ARGS += " --enable-clang-plugin"
@@ -254,34 +285,6 @@ opt = variant.get("nspr")
if opt is None or opt:
CONFIGURE_ARGS += " --enable-nspr-build"
-# Some of the variants request a particular word size (eg ARM simulators).
-word_bits = variant.get("bits")
-
-# On Linux and Windows, we build 32- and 64-bit versions on a 64 bit
-# host, so the caller has to specify what is desired.
-if word_bits is None and args.platform:
- platform_arch = args.platform.split("-")[0]
- if platform_arch in ("win32", "linux"):
- word_bits = 32
- elif platform_arch in ("win64", "linux64"):
- word_bits = 64
-
-# Fall back to the word size of the host.
-if word_bits is None:
- word_bits = 64 if platform.architecture()[0] == "64bit" else 32
-
-# Need a platform name to use as a key in variant files.
-if args.platform:
- variant_platform = args.platform.split("-")[0]
-elif platform.system() == "Windows":
- variant_platform = "win64" if word_bits == 64 else "win32"
-elif platform.system() == "Linux":
- variant_platform = "linux64" if word_bits == 64 else "linux"
-elif platform.system() == "Darwin":
- variant_platform = "macosx64"
-else:
- variant_platform = "other"
-
env["LD_LIBRARY_PATH"] = ":".join(
d
for d in [
@@ -437,7 +440,7 @@ CONFIGURE_ARGS += " --prefix={OBJDIR}/dist".format(OBJDIR=quote(OBJDIR))
# Generate a mozconfig.
with open(mozconfig, "wt") as fh:
if AUTOMATION and platform.system() == "Windows":
- fh.write('. "$topsrcdir/build/%s/mozconfig.vs-latest"\n' % variant_platform)
+ fh.write('. "$topsrcdir/build/mozconfig.clang-cl"\n')
fh.write("ac_add_options --enable-project=js\n")
fh.write("ac_add_options " + CONFIGURE_ARGS + "\n")
fh.write("mk_add_options MOZ_OBJDIR=" + quote(OBJDIR) + "\n")
@@ -665,7 +668,7 @@ if use_minidump:
[
mach,
"python",
- "virtualenv=build",
+ "--virtualenv=build",
os.path.join(DIR.source, "testing/mozbase/mozcrash/mozcrash/mozcrash.py"),
os.getenv("TMPDIR", "/tmp"),
os.path.join(OBJDIR, "dist/crashreporter-symbols"),