summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2019-03-01 10:41:34 +0100
committerMichael BrĂ¼ning <michael.bruning@qt.io>2019-03-01 17:04:22 +0000
commit0aae24c2876d19946ce0d28adc38c3dbed2c6549 (patch)
tree9a39563fc899bb9ff4cb7162c97ab002195d0e6c
parent3fe203d43c33e7eeb362b89587f8fb90fec9e826 (diff)
downloadqtwebengine-chromium-71-based.tar.gz
Add isysroot parameter for macOS to build gn with the right toolchainv5.13.0-beta171-based
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. Change-Id: I48ec9e37ee27c7dfa717c00cceefd3acc323cc48 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rwxr-xr-xgn/build/gen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gn/build/gen.py b/gn/build/gen.py
index 57f54ef5fa0..6aec03747ff 100755
--- a/gn/build/gen.py
+++ b/gn/build/gen.py
@@ -101,7 +101,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:
@@ -356,6 +357,8 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot):
cflags.append('-DNDEBUG')
cflags.append('-O3')
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.