summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-04-20 08:46:40 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-04 10:20:55 +0200
commitfa42c502897be5a5391a43838624d33ee4745720 (patch)
treeb7bd36c740d2e0d1af89fc8ffe318b6c2ce2ec10
parent213869f39631b49da9755996389bd86743b41971 (diff)
downloadqtwebengine-chromium-fa42c502897be5a5391a43838624d33ee4745720.tar.gz
Fix gn compilation on mac with Xcode 11.4
Update to Xcode 11.4 introduces new weak symbol which breaks gn linking with: Undefined symbols for architecture x86_64: "___darwin_check_fd_set_overflow" This symbol is declared by FD_SET macros referenced in exec_process.c and mark for weak linking, resulting object file has undefined weak symbol: (undefined) weak external ___darwin_check_fd_set_overflow Unfortunately during linking this is not handled properly without 'isysroot' parameter passed to linker. Fix it in gn build script. Change-Id: Ibb4c38aad098da1e119253cd89eba0216a921164 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> (cherry picked from commit d5c4b6230b7f915f6e044e230c0c575249938400) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rwxr-xr-xgn/build/gen.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn/build/gen.py b/gn/build/gen.py
index d454d3eab53..724d94c45c1 100755
--- a/gn/build/gen.py
+++ b/gn/build/gen.py
@@ -360,6 +360,8 @@ def WriteGNNinja(path, platform, host, options):
ldflags.append('-O3')
if platform.is_darwin() and options.isysroot:
cflags.append('-isysroot ' + options.isysroot)
+ ldflags.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.