Support .asm files for assembly
Test: mmma -j external/libjpeg-turbo Change-Id: Id192dae5d74ecbf500fc668931c37f9b91d25ca4
This commit is contained in:
@@ -158,6 +158,16 @@ var (
|
||||
Description: "tidy $out",
|
||||
},
|
||||
"cFlags", "tidyFlags")
|
||||
|
||||
yasmCmd = pctx.SourcePathVariable("yasmCmd", "prebuilts/misc/${config.HostPrebuiltTag}/yasm/yasm")
|
||||
|
||||
yasm = pctx.AndroidStaticRule("yasm",
|
||||
blueprint.RuleParams{
|
||||
Command: "$yasmCmd $asFlags -o $out $in",
|
||||
CommandDeps: []string{"$yasmCmd"},
|
||||
Description: "yasm $out",
|
||||
},
|
||||
"asFlags")
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -183,6 +193,7 @@ type builderFlags struct {
|
||||
yaccFlags string
|
||||
protoFlags string
|
||||
tidyFlags string
|
||||
yasmFlags string
|
||||
toolchain config.Toolchain
|
||||
clang bool
|
||||
tidy bool
|
||||
@@ -240,6 +251,19 @@ func TransformSourceToObj(ctx android.ModuleContext, subdir string, srcFiles and
|
||||
|
||||
objFiles[i] = objFile
|
||||
|
||||
if srcFile.Ext() == ".asm" {
|
||||
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
|
||||
Rule: yasm,
|
||||
Output: objFile,
|
||||
Input: srcFile,
|
||||
OrderOnly: deps,
|
||||
Args: map[string]string{
|
||||
"asFlags": flags.yasmFlags,
|
||||
},
|
||||
})
|
||||
continue
|
||||
}
|
||||
|
||||
var moduleCflags string
|
||||
var ccCmd string
|
||||
tidy := flags.tidy && flags.clang
|
||||
|
Reference in New Issue
Block a user