summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.