From: Mike Hommey Date: Sat, 14 Jan 2023 22:08:44 +0000 (+0900) Subject: Bug 1810627 - Allow to build without a wasi sysroot. r?build X-Git-Tag: archive/raspbian/102.7.0esr-1+rpi1^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b309b57f132b7ec62d11ec0a468c19912c312c3c;p=firefox-esr.git Bug 1810627 - Allow to build without a wasi sysroot. r?build On e.g. Debian unstable, the wasi SDK is available via packages in a multiarch fashion, which doesn't require the --sysroot flag being passed to the compiler. Differential Revision: https://phabricator.services.mozilla.com/D166978 Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1810627-Allow-to-build-without-a-wasi-sysroot.-r.patch --- diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 4c356e61b2f..33048062893 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -2412,21 +2412,10 @@ with only_when(requires_wasm_sandboxing & compile_environment): @depends( "--with-wasi-sysroot", bootstrap_path("sysroot-wasm32-wasi", when=bootstrap_wasi_sysroot), - "--with-wasm-sandboxed-libraries", ) @imports("os") - def wasi_sysroot(wasi_sysroot, bootstrapped_sysroot, sandboxed_libs): + def wasi_sysroot(wasi_sysroot, bootstrapped_sysroot): if not wasi_sysroot: - if not bootstrapped_sysroot: - suggest_disable = "" - if sandboxed_libs.origin == "default": - suggest_disable = ( - " Or build with --without-wasm-sandboxed-libraries." - ) - die( - "Cannot find a wasi sysroot. Please give its location with " - "--with-wasi-sysroot." + suggest_disable - ) return bootstrapped_sysroot wasi_sysroot = wasi_sysroot[0] @@ -2439,8 +2428,10 @@ with only_when(requires_wasm_sandboxing & compile_environment): @depends(wasi_sysroot) def wasi_sysroot_flags(wasi_sysroot): - log.info("Using wasi sysroot in %s", wasi_sysroot) - return ["--sysroot=%s" % wasi_sysroot] + if wasi_sysroot: + log.info("Using wasi sysroot in %s", wasi_sysroot) + return ["--sysroot=%s" % wasi_sysroot] + return [] set_config("WASI_SYSROOT", wasi_sysroot)