summaryrefslogtreecommitdiff
blob: 7a7c179011792f7ce086a20e62e7aa85089afbdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Index: soong-9999/build/soong/cc/builder.go
===================================================================
--- soong-9999.orig/build/soong/cc/builder.go
+++ soong-9999/build/soong/cc/builder.go
@@ -20,7 +20,6 @@ package cc
 
 import (
 	"fmt"
-	"path/filepath"
 	"runtime"
 	"strconv"
 	"strings"
@@ -44,7 +43,6 @@ var (
 			Depfile:     "${out}.d",
 			Deps:        blueprint.DepsGCC,
 			Command:     "$relPwd ${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
-			CommandDeps: []string{"$ccCmd"},
 		},
 		"ccCmd", "cFlags")
 
@@ -52,7 +50,6 @@ var (
 		blueprint.RuleParams{
 			Command: "$ldCmd ${crtBegin} @${out}.rsp " +
 				"${libFlags} ${crtEnd} -o ${out} ${ldFlags}",
-			CommandDeps:    []string{"$ldCmd"},
 			Rspfile:        "${out}.rsp",
 			RspfileContent: "${in}",
 		},
@@ -61,14 +58,12 @@ var (
 	partialLd = pctx.AndroidStaticRule("partialLd",
 		blueprint.RuleParams{
 			Command:     "$ldCmd -nostdlib -Wl,-r ${in} -o ${out} ${ldFlags}",
-			CommandDeps: []string{"$ldCmd"},
 		},
 		"ldCmd", "ldFlags")
 
 	ar = pctx.AndroidStaticRule("ar",
 		blueprint.RuleParams{
 			Command:        "rm -f ${out} && $arCmd $arFlags $out @${out}.rsp",
-			CommandDeps:    []string{"$arCmd"},
 			Rspfile:        "${out}.rsp",
 			RspfileContent: "${in}",
 		},
@@ -97,18 +92,14 @@ var (
 	prefixSymbols = pctx.AndroidStaticRule("prefixSymbols",
 		blueprint.RuleParams{
 			Command:     "$objcopyCmd --prefix-symbols=${prefix} ${in} ${out}",
-			CommandDeps: []string{"$objcopyCmd"},
 		},
 		"objcopyCmd", "prefix")
 
-	_ = pctx.SourcePathVariable("stripPath", "build/soong/scripts/strip.sh")
-
 	strip = pctx.AndroidStaticRule("strip",
 		blueprint.RuleParams{
 			Depfile:     "${out}.d",
 			Deps:        blueprint.DepsGCC,
-			Command:     "CROSS_COMPILE=$crossCompile $stripPath ${args} -i ${in} -o ${out} -d ${out}.d",
-			CommandDeps: []string{"$stripPath"},
+			Command:     "strip ${args} -i ${in} -o ${out} -d ${out}.d",
 		},
 		"args", "crossCompile")
 
@@ -124,7 +115,7 @@ var (
 			Depfile:     "${out}.d",
 			Deps:        blueprint.DepsGCC,
 			Command:     "$copyGccLibPath $out $ccCmd $cFlags -print-file-name=${libName}",
-			CommandDeps: []string{"$copyGccLibPath", "$ccCmd"},
+			CommandDeps: []string{"$copyGccLibPath"},
 		},
 		"ccCmd", "cFlags", "libName")
 
@@ -385,7 +376,6 @@ func TransformSourceToObj(ctx android.Mo
 		ccDesc := ccCmd
 
 		if flags.clang {
-			ccCmd = "${config.ClangBin}/" + ccCmd
 		} else {
 			ccCmd = gccCmd(flags.toolchain, ccCmd)
 		}
@@ -568,7 +558,7 @@ func TransformObjToDynamicBinary(ctx and
 
 	var ldCmd string
 	if flags.clang {
-		ldCmd = "${config.ClangBin}/clang++"
+		ldCmd = "clang++"
 	} else {
 		ldCmd = gccCmd(flags.toolchain, "g++")
 	}
@@ -714,7 +704,7 @@ func TransformObjsToObj(ctx android.Modu
 
 	var ldCmd string
 	if flags.clang {
-		ldCmd = "${config.ClangBin}/clang++"
+		ldCmd = "clang++"
 	} else {
 		ldCmd = gccCmd(flags.toolchain, "g++")
 	}
@@ -817,7 +807,7 @@ func CopyGccLib(ctx android.ModuleContex
 }
 
 func gccCmd(toolchain config.Toolchain, cmd string) string {
-	return filepath.Join(toolchain.GccRoot(), "bin", toolchain.GccTriple()+"-"+cmd)
+	return cmd
 }
 
 func splitListForSize(list android.Paths, limit int) (lists []android.Paths, err error) {