summaryrefslogtreecommitdiff
path: root/test/toolsets/toolsets.gyp
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2013-04-11 18:28:51 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2013-04-11 18:28:51 +0000
commit6b00a9ff28317a25380e1f1157afaf4337e8fb44 (patch)
treecd1d8709739ab81a036c66cbd445c29eec9c7f5b /test/toolsets/toolsets.gyp
parent0f416e49e716f6aded6b1a6422d88b9d6c9d5adb (diff)
downloadgyp-6b00a9ff28317a25380e1f1157afaf4337e8fb44.tar.gz
Fix rpath for components when cross-compiling.
This came up while bringing up the components build for Android. Trying to run v8_shell failed: out/Debug/v8_shell: error while loading shared libraries: libv8.cr.so: cannot open shared object file: No such file or directory readelf -d out/Debug/v8_shell shows the problem: 0x0000000f (RPATH) Library rpath: [$ORIGIN/lib/] For cross-compiles, host shared libraries are placed in /lib/host BUG=chromium:158821 Review URL: https://codereview.chromium.org/13992005 git-svn-id: http://gyp.googlecode.com/svn/trunk@1607 78cadc50-ecff-11dd-a971-7dbc132099af
Diffstat (limited to 'test/toolsets/toolsets.gyp')
-rw-r--r--test/toolsets/toolsets.gyp17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/toolsets/toolsets.gyp b/test/toolsets/toolsets.gyp
index 6afa7ece..3bc3a784 100644
--- a/test/toolsets/toolsets.gyp
+++ b/test/toolsets/toolsets.gyp
@@ -21,7 +21,7 @@
'target_name': 'host-main',
'type': 'executable',
'toolsets': ['host'],
- 'dependencies': ['toolsets'],
+ 'dependencies': ['toolsets', 'toolsets_shared'],
'sources': [
'main.cc',
],
@@ -29,7 +29,7 @@
{
'target_name': 'target-main',
'type': 'executable',
- 'dependencies': ['toolsets'],
+ 'dependencies': ['toolsets', 'toolsets_shared'],
'sources': [
'main.cc',
],
@@ -45,5 +45,18 @@
],
'cflags': [ '-fPIC' ],
},
+ {
+ 'target_name': 'toolsets_shared',
+ 'type': 'shared_library',
+ 'toolsets': ['target', 'host'],
+ 'target_conditions': [
+ # Ensure target and host have different shared_library names
+ ['_toolset=="host"', {'product_extension': 'host'}],
+ ],
+ 'sources': [
+ 'toolsets_shared.cc',
+ ],
+ 'cflags': [ '-fPIC' ],
+ },
],
}