diff --git a/toolchain.gypi b/toolchain.gypi index 5e291127a2..34d1af9cb8 100644 --- a/toolchain.gypi +++ b/toolchain.gypi @@ -172,7 +172,11 @@ 'target_defaults': { 'target_conditions': [ ['_toolset=="target"', { - 'cflags': [ + # Do not use 'cflags' to make sure sysroot is appended at last. + 'cflags_cc': [ + '--sysroot=<(sysroot)', + ], + 'cflags_c': [ '--sysroot=<(sysroot)', ], 'ldflags': [