Bug 1792666 - Add comment that was meant to be added but ended up missing DONTBUILD
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 29 Sep 2022 08:43:45 +0000
changeset 4682696 6f957308dfcb1ee28a2260b060e26bd72eba8429
parent 4682680 fef48bed539e49f3bd5859af1045da795bdab8f9
child 4682697 42e4409cfec495b2f8447e64ecb28db6fc1d194a
child 4682760 0fb669ea3b7be699c6f65bff4f932eb5e396c7c3
push id858553
push userreviewbot
push dateThu, 29 Sep 2022 08:52:09 +0000
treeherdertry@663ba496f393 [default view] [failures only]
bugs1792666
milestone107.0a1
Bug 1792666 - Add comment that was meant to be added but ended up missing DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D158316
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1172,16 +1172,19 @@ def compiler(
         sysroot,
         macos_target,
         multiarch_dir,
     ):
         wrapper = list(compiler_wrapper or ())
         flags = []
         if sysroot.path:
             if host_or_target.kernel == "Darwin":
+                # While --sysroot and -isysroot are roughly equivalent, when not using
+                # -isysroot on mac, clang takes the SDKROOT environment variable into
+                # consideration, which may be set by python and break things.
                 flags.extend(("-isysroot", sysroot.path))
             else:
                 flags.extend(("--sysroot", sysroot.path))
         if host_or_target.os == "OSX" and macos_target:
             flags.append("-mmacosx-version-min=%s" % macos_target)
         if provided_compiler:
             wrapper.extend(provided_compiler.wrapper)
             flags.extend(provided_compiler.flags)