diff options
author | Colin Cross <ccross@android.com> | 2017-04-26 14:55:27 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-04-27 12:21:24 -0700 |
commit | dad8c954b20071e51e9d47117b2724ab71205fe3 (patch) | |
tree | 87bcc2475c8aae1c534d6daee03dc72c5ca8d5b0 /cc/compiler.go | |
parent | 0906f17f7e8bf0e76cb8511669e8fc8d5f6f3794 (diff) | |
download | build_soong-dad8c954b20071e51e9d47117b2724ab71205fe3.tar.gz build_soong-dad8c954b20071e51e9d47117b2724ab71205fe3.tar.bz2 build_soong-dad8c954b20071e51e9d47117b2724ab71205fe3.zip |
Pass -I to yasm
external/libvpx needs -I flags to be propagated to yasm, but can't
handle all the other global flags (like -no-exceptions). Add -I
arguments to YasmFlags as well as GlobalFlags.
Test: mega-device build of external/libvpx
Change-Id: I1607211c34b031fae8ffc1bd558b26019965a696
Diffstat (limited to 'cc/compiler.go')
-rw-r--r-- | cc/compiler.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cc/compiler.go b/cc/compiler.go index aed4480e..a122bbd9 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -198,15 +198,20 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag // Include dir cflags localIncludeDirs := android.PathsForModuleSrc(ctx, compiler.Properties.Local_include_dirs) if len(localIncludeDirs) > 0 { - flags.GlobalFlags = append(flags.GlobalFlags, includeDirsToFlags(localIncludeDirs)) + f := includeDirsToFlags(localIncludeDirs) + flags.GlobalFlags = append(flags.GlobalFlags, f) + flags.YasmFlags = append(flags.YasmFlags, f) } rootIncludeDirs := android.PathsForSource(ctx, compiler.Properties.Include_dirs) if len(rootIncludeDirs) > 0 { - flags.GlobalFlags = append(flags.GlobalFlags, includeDirsToFlags(rootIncludeDirs)) + f := includeDirsToFlags(rootIncludeDirs) + flags.GlobalFlags = append(flags.GlobalFlags, f) + flags.YasmFlags = append(flags.YasmFlags, f) } if !ctx.noDefaultCompilerFlags() { flags.GlobalFlags = append(flags.GlobalFlags, "-I"+android.PathForModuleSrc(ctx).String()) + flags.YasmFlags = append(flags.YasmFlags, "-I"+android.PathForModuleSrc(ctx).String()) if !(ctx.sdk() || ctx.vndk()) || ctx.Host() { flags.SystemIncludeFlags = append(flags.SystemIncludeFlags, |