Merge "Add 'openmp' compiler property"
am: 91aa9f9d54
Change-Id: I6edc27d9d49d5cd347702fd70fd93f6e9afdabea
This commit is contained in:
committed by
android-build-merger
commit
29d92cef6d
@@ -148,6 +148,9 @@ type BaseCompilerProperties struct {
|
|||||||
|
|
||||||
// Stores the original list of source files before being cleared by library reuse
|
// Stores the original list of source files before being cleared by library reuse
|
||||||
OriginalSrcs []string `blueprint:"mutated"`
|
OriginalSrcs []string `blueprint:"mutated"`
|
||||||
|
|
||||||
|
// Build and link with OpenMP
|
||||||
|
Openmp *bool `android:"arch_variant"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewBaseCompiler() *baseCompiler {
|
func NewBaseCompiler() *baseCompiler {
|
||||||
@@ -204,6 +207,10 @@ func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
|
|||||||
deps = protoDeps(ctx, deps, &compiler.Proto, Bool(compiler.Properties.Proto.Static))
|
deps = protoDeps(ctx, deps, &compiler.Proto, Bool(compiler.Properties.Proto.Static))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if Bool(compiler.Properties.Openmp) {
|
||||||
|
deps.StaticLibs = append(deps.StaticLibs, "libomp")
|
||||||
|
}
|
||||||
|
|
||||||
return deps
|
return deps
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,6 +501,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if Bool(compiler.Properties.Openmp) {
|
||||||
|
flags.CFlags = append(flags.CFlags, "-fopenmp")
|
||||||
|
}
|
||||||
|
|
||||||
return flags
|
return flags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user