diff --git a/common.gypi b/common.gypi index 4e645cf50671d4..3e1902fb7892bb 100644 --- a/common.gypi +++ b/common.gypi @@ -411,28 +411,56 @@ 'cflags': [ '-I/usr/local/include' ], 'ldflags': [ '-Wl,-z,wxneeded' ], }], - ], - 'conditions': [ - [ 'target_arch=="ia32"', { - 'cflags': [ '-m32' ], - 'ldflags': [ '-m32' ], - }], - [ 'target_arch=="x64"', { - 'cflags': [ '-m64' ], - 'ldflags': [ '-m64' ], - }], - [ 'target_arch=="ppc" and OS not in "aix os400"', { - 'cflags': [ '-m32' ], - 'ldflags': [ '-m32' ], - }], - [ 'target_arch=="ppc64" and OS not in "aix os400"', { - 'cflags': [ '-m64', '-mminimal-toc' ], - 'ldflags': [ '-m64' ], + ['_toolset=="host"', { + 'conditions': [ + [ 'host_arch=="ia32"', { + 'cflags': [ '-m32' ], + 'ldflags': [ '-m32' ], + }], + [ 'host_arch=="x64"', { + 'cflags': [ '-m64' ], + 'ldflags': [ '-m64' ], + }], + [ 'host_arch=="ppc" and OS not in "aix os400"', { + 'cflags': [ '-m32' ], + 'ldflags': [ '-m32' ], + }], + [ 'host_arch=="ppc64" and OS not in "aix os400"', { + 'cflags': [ '-m64', '-mminimal-toc' ], + 'ldflags': [ '-m64' ], + }], + [ 'host_arch=="s390x" and OS=="linux"', { + 'cflags': [ '-m64', '-march=z196' ], + 'ldflags': [ '-m64', '-march=z196' ], + }], + ], }], - [ 'target_arch=="s390x" and OS=="linux"', { - 'cflags': [ '-m64', '-march=z196' ], - 'ldflags': [ '-m64', '-march=z196' ], + ['_toolset=="target"', { + 'conditions': [ + [ 'target_arch=="ia32"', { + 'cflags': [ '-m32' ], + 'ldflags': [ '-m32' ], + }], + [ 'target_arch=="x64"', { + 'cflags': [ '-m64' ], + 'ldflags': [ '-m64' ], + }], + [ 'target_arch=="ppc" and OS not in "aix os400"', { + 'cflags': [ '-m32' ], + 'ldflags': [ '-m32' ], + }], + [ 'target_arch=="ppc64" and OS not in "aix os400"', { + 'cflags': [ '-m64', '-mminimal-toc' ], + 'ldflags': [ '-m64' ], + }], + [ 'target_arch=="s390x" and OS=="linux"', { + 'cflags': [ '-m64', '-march=z196' ], + 'ldflags': [ '-m64', '-march=z196' ], + }], + ], }], + ], + 'conditions': [ [ 'OS=="solaris"', { 'cflags': [ '-pthreads' ], 'ldflags': [ '-pthreads' ],