Don't add -L for libs that don't need it.
We're already referring to the library by the full path. The -L is unnecessary. Follow up to https://android-review.googlesource.com/#/c/249544/ Test: Still builds. Change-Id: Id27dff29f75797c4c0dcc66704ac08cc0b58cfe3
This commit is contained in:
@@ -50,14 +50,14 @@ var (
|
|||||||
|
|
||||||
ld = pctx.StaticRule("ld",
|
ld = pctx.StaticRule("ld",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: "$ldCmd ${ldDirFlags} ${crtBegin} @${out}.rsp " +
|
Command: "$ldCmd ${crtBegin} @${out}.rsp " +
|
||||||
"${libFlags} ${crtEnd} -o ${out} ${ldFlags}",
|
"${libFlags} ${crtEnd} -o ${out} ${ldFlags}",
|
||||||
CommandDeps: []string{"$ldCmd"},
|
CommandDeps: []string{"$ldCmd"},
|
||||||
Description: "ld $out",
|
Description: "ld $out",
|
||||||
Rspfile: "${out}.rsp",
|
Rspfile: "${out}.rsp",
|
||||||
RspfileContent: "${in}",
|
RspfileContent: "${in}",
|
||||||
},
|
},
|
||||||
"ldCmd", "ldDirFlags", "crtBegin", "libFlags", "crtEnd", "ldFlags")
|
"ldCmd", "crtBegin", "libFlags", "crtEnd", "ldFlags")
|
||||||
|
|
||||||
partialLd = pctx.StaticRule("partialLd",
|
partialLd = pctx.StaticRule("partialLd",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
@@ -350,7 +350,6 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
|||||||
ldCmd = gccCmd(flags.toolchain, "g++")
|
ldCmd = gccCmd(flags.toolchain, "g++")
|
||||||
}
|
}
|
||||||
|
|
||||||
var ldDirs []string
|
|
||||||
var libFlagsList []string
|
var libFlagsList []string
|
||||||
|
|
||||||
if len(flags.libFlags) > 0 {
|
if len(flags.libFlags) > 0 {
|
||||||
@@ -378,7 +377,7 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, lib := range sharedLibs {
|
for _, lib := range sharedLibs {
|
||||||
dir, file := filepath.Split(lib.String())
|
file := filepath.Base(lib.String())
|
||||||
if !strings.HasPrefix(file, "lib") {
|
if !strings.HasPrefix(file, "lib") {
|
||||||
panic("shared library " + lib.String() + " does not start with lib")
|
panic("shared library " + lib.String() + " does not start with lib")
|
||||||
}
|
}
|
||||||
@@ -386,7 +385,6 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
|||||||
panic("shared library " + lib.String() + " does not end with " + flags.toolchain.ShlibSuffix())
|
panic("shared library " + lib.String() + " does not end with " + flags.toolchain.ShlibSuffix())
|
||||||
}
|
}
|
||||||
libFlagsList = append(libFlagsList, lib.String())
|
libFlagsList = append(libFlagsList, lib.String())
|
||||||
ldDirs = append(ldDirs, dir)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deps = append(deps, sharedLibs...)
|
deps = append(deps, sharedLibs...)
|
||||||
@@ -403,12 +401,11 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext,
|
|||||||
Inputs: objFiles,
|
Inputs: objFiles,
|
||||||
Implicits: deps,
|
Implicits: deps,
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"ldCmd": ldCmd,
|
"ldCmd": ldCmd,
|
||||||
"ldDirFlags": ldDirsToFlags(ldDirs),
|
"crtBegin": crtBegin.String(),
|
||||||
"crtBegin": crtBegin.String(),
|
"libFlags": strings.Join(libFlagsList, " "),
|
||||||
"libFlags": strings.Join(libFlagsList, " "),
|
"ldFlags": flags.ldFlags,
|
||||||
"ldFlags": flags.ldFlags,
|
"crtEnd": crtEnd.String(),
|
||||||
"crtEnd": crtEnd.String(),
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user