diff --git a/cc/androidmk.go b/cc/androidmk.go index 7ae960a75..3467e690c 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -115,6 +115,18 @@ func (test *testLinker) AndroidMk(ret *common.AndroidMkData) { } } +func (library *toolchainLibraryLinker) AndroidMk(ret *common.AndroidMkData) { + library.baseLinker.AndroidMk(ret) + + ret.Extra = append(ret.Extra, func(w io.Writer, outputFile common.Path) error { + fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+outputFile.Ext()) + fmt.Fprintln(w, "LOCAL_CXX_STL := none") + fmt.Fprintln(w, "LOCAL_SYSTEM_SHARED_LIBRARIES :=") + + return nil + }) +} + func (installer *baseInstaller) AndroidMk(ret *common.AndroidMkData) { ret.Extra = append(ret.Extra, func(w io.Writer, outputFile common.Path) error { path := installer.path.RelPathString() diff --git a/cc/makevars.go b/cc/makevars.go index 00a4f712a..247036e0e 100644 --- a/cc/makevars.go +++ b/cc/makevars.go @@ -29,6 +29,11 @@ func init() { func makeVarsProvider(ctx common.MakeVarsContext) { ctx.Strict("LLVM_PREBUILTS_VERSION", "${clangVersion}") ctx.Strict("LLVM_PREBUILTS_BASE", "${clangBase}") + ctx.Strict("LLVM_PREBUILTS_PATH", "${clangBin}") + ctx.Strict("CLANG", "${clangBin}/clang") + ctx.Strict("CLANG_CXX", "${clangBin}/clang++") + ctx.Strict("LLVM_AS", "${clangBin}/llvm-as") + ctx.Strict("LLVM_LINK", "${clangBin}/llvm-link") hostType := common.CurrentHostType() arches := ctx.Config().HostArches[hostType] @@ -108,4 +113,16 @@ func makeVarsToolchain(ctx common.MakeVarsContext, secondPrefix string, ctx.Strict(makePrefix+"READELF", gccCmd(toolchain, "readelf")) ctx.Strict(makePrefix+"NM", gccCmd(toolchain, "nm")) } + + if ht == common.Windows { + ctx.Strict(makePrefix+"OBJDUMP", gccCmd(toolchain, "objdump")) + } + + if hod.Device() { + ctx.Strict(makePrefix+"OBJCOPY", gccCmd(toolchain, "objcopy")) + ctx.Strict(makePrefix+"LD", gccCmd(toolchain, "ld")) + ctx.Strict(makePrefix+"STRIP", gccCmd(toolchain, "strip")) + } + + ctx.Strict(makePrefix+"TOOLS_PREFIX", gccCmd(toolchain, "")) }