Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 81f8010

Browse files
livecodefraserlivecodeian
authored andcommitted
Ensure thirdparty libs use host/target vars appropriately
Settings should always be based on the compilation toolset (host or target) rather than always being the target (as some components are required to be built for the host when cross-compiling).
1 parent a18fe93 commit 81f8010

8 files changed

Lines changed: 246 additions & 172 deletions

File tree

libcef/libcef.gyp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
{
1010
'target_name': 'libcef_library_wrapper',
1111
'type': 'static_library',
12+
13+
'toolsets': ['host', 'target'],
1214

1315
'variables':
1416
{
@@ -17,16 +19,22 @@
1719
},
1820

1921
# OSX, Windows and Linux only
20-
'conditions':
22+
'target_conditions':
2123
[
2224
[
23-
'OS != "mac" and OS != "win" and OS != "linux"',
25+
'not toolset_os in ("mac", "win", "linux")',
2426
{
2527
'type': 'none',
2628
},
2729
],
2830
[
29-
'OS == "win"',
31+
'toolset_os == "linux" and not toolset_arch in ("x86", "x86_64")',
32+
{
33+
'type': 'none',
34+
},
35+
],
36+
[
37+
'toolset_os == "win"',
3038
{
3139
'defines':
3240
[
@@ -262,17 +270,19 @@
262270
'target_name': 'libcef_stubs',
263271
'type': 'static_library',
264272

273+
'toolsets': ['host', 'target'],
274+
265275
'variables':
266276
{
267277
'library_for_module': 1,
268278
'silence_warnings': 1,
269279
},
270280

271281
# OSX, Windows and Linux only
272-
'conditions':
282+
'target_conditions':
273283
[
274284
[
275-
'OS != "mac" and OS != "win" and OS != "linux"',
285+
'not toolset_os in ("mac", "win", "linux")',
276286
{
277287
'type': 'none',
278288
},

libexpat/libexpat.gyp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
{
1010
'target_name': 'libexpat',
1111
'type': 'static_library',
12+
13+
'toolsets': ['host', 'target'],
1214

1315
'variables':
1416
{
@@ -58,10 +60,10 @@
5860
],
5961
},
6062

61-
'conditions':
63+
'target_conditions':
6264
[
6365
[
64-
'OS != "android"',
66+
'toolset_os != "android"',
6567
{
6668
'type': 'none',
6769
},

libffi/libffi.gyp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
},
285285
],
286286
[
287-
'(toolset_os == "linux" or toolset_os == "android") and (toolset_arch == "armv6" or toolset_arch == "armv6hf")',
287+
'toolset_os in ("linux", "android") and toolset_arch in ("armv6", "armv6hf", "armv7")',
288288
{
289289
'platform_include_dirs':
290290
[
@@ -297,11 +297,19 @@
297297
'<@(libffi_generic_sources)'
298298
],
299299

300-
# Disable VFP
301-
'cflags':
302-
[
303-
'-U__ARM_EABI__',
304-
],
300+
# Disable VFP for non-hard-float targets
301+
'conditions':
302+
[
303+
[
304+
'toolset_arch == "armv6"',
305+
{
306+
'cflags':
307+
[
308+
'-U__ARM_EABI__',
309+
],
310+
},
311+
],
312+
],
305313
},
306314
],
307315
[

libgif/libgif.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
{
1010
'target_name': 'libgif',
1111

12+
'toolsets': ['host', 'target'],
13+
1214
'conditions':
1315
[
1416
[

libjpeg/libjpeg.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
[
99
{
1010
'target_name': 'libjpeg',
11+
12+
'toolsets': ['host', 'target'],
1113

1214
'conditions':
1315
[

libpcre/libpcre.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
{
1010
'target_name': 'libpcre',
1111

12+
'toolsets': ['host', 'target'],
13+
1214
'conditions':
1315
[
1416
[

libpng/libpng.gyp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
{
1010
'target_name': 'libpng',
1111

12+
'toolsets': ['host', 'target'],
13+
1214
'dependencies':
1315
[
1416
'../libz/libz.gyp:libz',

0 commit comments

Comments
 (0)