diff options
author | Tobias Bosch <tbosch@google.com> | 2019-07-17 04:22:34 -0700 |
---|---|---|
committer | Tobias Bosch <tbosch@google.com> | 2019-07-18 09:08:50 +0000 |
commit | 198a3c9519e5d93ffeb8f5e1b6694c34b178c5c4 (patch) | |
tree | 770bbd6c63184a1dbcdbcee01bf551815d062bee /compiler_wrapper/config.go | |
parent | 22c32b40be54a9e4062655f90908f98b11e73966 (diff) | |
download | toolchain-utils-198a3c9519e5d93ffeb8f5e1b6694c34b178c5c4.tar.gz |
Fix minor bugs
These bugs were detected while creating golden tests
and comparing them to the old wrapper (see next commit).
Also makes flag order in old wrapper deterministic by
replacing sets with a SetList class that is based
on a list.
BUG=chromium:773875
TEST=unit test
Change-Id: I8e2680f732577f1f590042f1ccd589dfedadd6ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1706791
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.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go index 5e594cc3..45e82575 100644 --- a/compiler_wrapper/config.go +++ b/compiler_wrapper/config.go @@ -68,29 +68,29 @@ func getCrosHardenedConfig(useCCache bool) *config { rootRelPath: "../../../../..", oldWrapperPath: "./sysroot_wrapper.hardened.old", commonFlags: []string{ - "-fPIE", - "-D_FORTIFY_SOURCE=2", "-fstack-protector-strong", + "-fPIE", "-pie", + "-D_FORTIFY_SOURCE=2", "-fno-omit-frame-pointer", }, gccFlags: []string{ + "-fno-reorder-blocks-and-partition", "-Wno-unused-local-typedefs", "-Wno-maybe-uninitialized", - "-fno-reorder-blocks-and-partition", }, // Temporarily disable tautological-*-compare chromium:778316. // Temporarily add no-unknown-warning-option to deal with old clang versions. // Temporarily disable Wsection since kernel gets a bunch of these. chromium:778867 // Disable "-faddrsig" since it produces object files that strip doesn't understand, chromium:915742. clangFlags: []string{ - "-Wno-tautological-unsigned-enum-zero-compare", "-Qunused-arguments", "-grecord-gcc-switches", - "-Wno-section", - "-Wno-unknown-warning-option", "-fno-addrsig", "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", }, newWarningsDir: "/tmp/fatal_clang_warnings", } @@ -104,20 +104,20 @@ func getCrosNonHardenedConfig(useCCache bool) *config { oldWrapperPath: "./sysroot_wrapper.old", commonFlags: []string{}, gccFlags: []string{ - "-Wno-unused-local-typedefs", "-Wno-maybe-uninitialized", - "-Wtrampolines", + "-Wno-unused-local-typedefs", "-Wno-deprecated-declarations", + "-Wtrampolines", }, // Temporarily disable tautological-*-compare chromium:778316. // Temporarily add no-unknown-warning-option to deal with old clang versions. // Temporarily disable Wsection since kernel gets a bunch of these. chromium:778867 clangFlags: []string{ - "-Wno-unknown-warning-option", "-Qunused-arguments", - "-Wno-section", - "-Wno-tautological-unsigned-enum-zero-compare", "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", }, newWarningsDir: "/tmp/fatal_clang_warnings", } |