diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2019-03-01 10:41:34 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-11-11 13:13:32 +0100 |
commit | 20a76bec3d171664f6bff733bfa27cec941f21cd (patch) | |
tree | 78f2ad6f6c7cb3c7211ed84acba5860bb2820e05 /gn | |
parent | cb670a7d7a4673e763ea45cef96b83e06ada1dfc (diff) | |
download | qtwebengine-chromium-20a76bec3d171664f6bff733bfa27cec941f21cd.tar.gz |
Add isysroot parameter for macOS to build gn with the right toolchain
Uses the isysroot passed in, which will be set to $$QMAKE_MAC_SDK_PATH
by the WebEngine build scripts.
Leaving this out when specifying a tool chain leads to problems on macOS
10.14 when the command line tools are also installed, as some symlinks
point to the wrong clang executable.
We also add the isysroot for the rest of Qt and Chromium detects it as
well, so this adds to consistency as well.
Cherry-pick from 71-based.
Change-Id: I267c0428f0a472a026451aefaf558e5d6c129303
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'gn')
-rwxr-xr-x | gn/build/gen.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gn/build/gen.py b/gn/build/gen.py index 767a444ec8d..d454d3eab53 100755 --- a/gn/build/gen.py +++ b/gn/build/gen.py @@ -137,7 +137,8 @@ def main(argv): help='The path to ld.') parser.add_option('--ar', help='The path to ar.') - + parser.add_option('--isysroot', + help='The path to the macOS SDK sysroot to be used.') options, args = parser.parse_args(argv) if args: @@ -357,6 +358,8 @@ def WriteGNNinja(path, platform, host, options): if options.no_strip: cflags.append('-g') ldflags.append('-O3') + if platform.is_darwin() and options.isysroot: + cflags.append('-isysroot ' + options.isysroot) # Use -fdata-sections and -ffunction-sections to place each function # or data item into its own section so --gc-sections can eliminate any # unused functions and data items. |