summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 01:53:01 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 01:53:01 +0000
commitee28c9fa1dc4b7d092ddea96e2c19d41970e18bb (patch)
tree68f4f01503522cec6442f03198ee2acf3ec01827 /build/common.gypi
parent60f2ea2a43fd576f8e88ae85929a423f686889b0 (diff)
downloadchromium_src-ee28c9fa1dc4b7d092ddea96e2c19d41970e18bb.zip
chromium_src-ee28c9fa1dc4b7d092ddea96e2c19d41970e18bb.tar.gz
chromium_src-ee28c9fa1dc4b7d092ddea96e2c19d41970e18bb.tar.bz2
linux: improve support for cross-compiling
This CL adds support for a 'sysroot' GYP define, that should point to the target root filesystem for cross-compilation. It passes that argument to the compiler and linker which uses it to prefix its hard-coded path (e.g. /usr/include) It also points pkg-config to look for package configs there, and rewrite the paths to be prefixed by 'sysroot' (since pkg-config doesn't do it itself) Review URL: http://codereview.chromium.org/199016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi13
1 files changed, 12 insertions, 1 deletions
diff --git a/build/common.gypi b/build/common.gypi
index cd48bb9..3d6f1ea 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -101,6 +101,9 @@
'chromeos%': 0,
+ # The system root for cross-compiles. Default: none.
+ 'sysroot%': '',
+
# This is the location of the sandbox binary. Chrome looks for this before
# running the zygote process. If found, and SUID, it will be used to
# sandbox the zygote process and, thus, all renderer processes.
@@ -532,6 +535,14 @@
}],
],
}],
+ ['sysroot!=""', {
+ 'cflags': [
+ '--sysroot=<(sysroot)',
+ ],
+ 'ldflags': [
+ '--sysroot=<(sysroot)',
+ ],
+ }],
['no_strict_aliasing==1', {
'cflags': [
'-fno-strict-aliasing',
@@ -766,4 +777,4 @@
# and therefore SYMROOT, needs to be set at the project level.
'SYMROOT': '<(DEPTH)/xcodebuild',
},
-} \ No newline at end of file
+}