From 81c23b84e7ed04aba646171c9adaf3b21d00485d Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 31 Jan 2018 17:13:59 +0900 Subject: [PATCH] Fix error when cross compilation --- common.gypi | 2 +- toolchain.gypi | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index df932c1e3949..f4189345646d 100644 --- a/common.gypi +++ b/common.gypi @@ -245,7 +245,7 @@ }], # OS=="win" ], }], - ['OS=="linux" and _target_name in ["dump_syms", "node"]', { + ['OS=="linux" and _toolset=="target" and _target_name in ["dump_syms", "node"]', { 'conditions': [ ['libchromiumcontent_component==0', { 'libraries': [ diff --git a/toolchain.gypi b/toolchain.gypi index 34d1af9cb808..0b4ffa3e5eb9 100644 --- a/toolchain.gypi +++ b/toolchain.gypi @@ -129,7 +129,7 @@ 'OTHER_LDFLAGS': [ '-stdlib=libc++' ], }, }], - ['OS=="linux"', { + ['OS=="linux" and _toolset=="target"', { 'cflags_cc': [ '-std=gnu++14', '-nostdinc++', @@ -140,6 +140,11 @@ '-nostdlib++', ], }], + ['OS=="linux" and _toolset=="host"', { + 'cflags_cc': [ + '-std=gnu++14', + ], + }], ], }, }], # clang==1