aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2022-05-10 13:02:14 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-05-10 21:08:22 +0000
commit24ac18e68a75cf876d7bb0e2880945085373668b (patch)
tree7b1964cfbbe38e99b3f29d10164708f38f524e33
parent58bd94f0cf7bba9b91e24d75e991f098723d81ee (diff)
downloadtoolchain-utils-24ac18e68a75cf876d7bb0e2880945085373668b.tar.gz
compiler_wrapper: un-pointer-ify all configs
We do nothing with these but immediately deref them. It's simpler (and should be infinitesimally faster) to just have values here. BUG=None TEST=go test Change-Id: I6df8eda8f36032e856f9abad3e090c62c9d6beb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3639684 Commit-Queue: George Burgess <gbiv@chromium.org> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: George Burgess <gbiv@chromium.org>
-rw-r--r--compiler_wrapper/config.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go
index e6708ebf..4e9c4f10 100644
--- a/compiler_wrapper/config.go
+++ b/compiler_wrapper/config.go
@@ -83,13 +83,13 @@ func getConfig(configName string, useCCache bool, useLlvmNext bool, version stri
cfg := config{}
switch configName {
case "cros.hardened":
- cfg = *crosHardenedConfig
+ cfg = crosHardenedConfig
case "cros.nonhardened":
- cfg = *crosNonHardenedConfig
+ cfg = crosNonHardenedConfig
case "cros.host":
- cfg = *crosHostConfig
+ cfg = crosHostConfig
case "android":
- cfg = *androidConfig
+ cfg = androidConfig
default:
return nil, newErrorwithSourceLocf("unknown config name: %s", configName)
}
@@ -105,7 +105,7 @@ func getConfig(configName string, useCCache bool, useLlvmNext bool, version stri
// Full hardening.
// Temporarily disable function splitting because of chromium:434751.
-var crosHardenedConfig = &config{
+var crosHardenedConfig = config{
clangRootRelPath: "../..",
gccRootRelPath: "../../../../..",
// Pass "-fcommon" till the packages are fixed to work with new clang/gcc
@@ -163,7 +163,7 @@ var crosHardenedConfig = &config{
}
// Flags to be added to non-hardened toolchain.
-var crosNonHardenedConfig = &config{
+var crosNonHardenedConfig = config{
clangRootRelPath: "../..",
gccRootRelPath: "../../../../..",
commonFlags: []string{},
@@ -206,7 +206,7 @@ var crosNonHardenedConfig = &config{
}
// Flags to be added to host toolchain.
-var crosHostConfig = &config{
+var crosHostConfig = config{
isHostWrapper: true,
clangRootRelPath: "../..",
gccRootRelPath: "../..",
@@ -255,7 +255,7 @@ var crosHostConfig = &config{
crashArtifactsDir: "/tmp/clang_crash_diagnostics",
}
-var androidConfig = &config{
+var androidConfig = config{
isHostWrapper: false,
isAndroidWrapper: true,
gccRootRelPath: "./",