aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/config.go
diff options
context:
space:
mode:
authorTobias Bosch <tbosch@google.com>2019-09-30 10:11:25 -0700
committerTobias Bosch <tbosch@google.com>2019-09-30 17:43:29 +0000
commitbbb3c8113eb9c8b44d727874ae46066e7f2ca81b (patch)
tree76aff18464d8c859db0a53edd74f75ffe0d44d58 /compiler_wrapper/config.go
parent0010a5194eb63fa107d3d982fa6037b655c409fc (diff)
downloadtoolchain-utils-bbb3c8113eb9c8b44d727874ae46066e7f2ca81b.tar.gz
Initial support for the android wrapper.
BUG=chromium:773875 TEST=golden tests and comparison against old andorid wrapper. Change-Id: Ic11be4bc1399adcbf9c50134928aceda45e936ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1831787 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/config.go')
-rw-r--r--compiler_wrapper/config.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go
index 4270cf5e..2a3c5971 100644
--- a/compiler_wrapper/config.go
+++ b/compiler_wrapper/config.go
@@ -10,7 +10,8 @@ import (
type config struct {
// TODO: Refactor this flag into more generic configuration properties.
- isHostWrapper bool
+ isHostWrapper bool
+ isAndroidWrapper bool
// Whether to use ccache.
useCCache bool
// Flags to add to gcc and clang.
@@ -79,6 +80,8 @@ func getConfig(configName string, useCCache bool, useLlvmNext bool, oldWrapperPa
cfg = *crosNonHardenedConfig
case "cros.host":
cfg = *crosHostConfig
+ case "android":
+ cfg = *androidConfig
default:
return nil, newErrorwithSourceLocf("unknown config name: %s", configName)
}
@@ -181,3 +184,13 @@ var crosHostConfig = &config{
},
newWarningsDir: "/tmp/fatal_clang_warnings",
}
+
+var androidConfig = &config{
+ isHostWrapper: false,
+ isAndroidWrapper: true,
+ rootRelPath: "./",
+ commonFlags: []string{},
+ gccFlags: []string{},
+ clangFlags: []string{},
+ newWarningsDir: "/tmp/fatal_clang_warnings",
+}