Revert "compiler_wrapper: enable -mharden-sls=all on aarch64"
This reverts commit fb8fd5be362ec7a52dc3be33859d31b0553c1038. Enabling
the option caused 4.4 based arm64 devices failed to boot. Disable this
option until the issue is fixed.
BUG=chromium:1096302
TEST=Verified locally.
Change-Id: I02d5a72423f3cf0097edff7ace85b23caf3ff554
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2469305
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Jian Cai <jiancai@google.com>
diff --git a/compiler_wrapper/aarch64_flags.go b/compiler_wrapper/aarch64_flags.go
deleted file mode 100644
index a0d0552..0000000
--- a/compiler_wrapper/aarch64_flags.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2020 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package main
-
-func processAarch64Flags(builder *commandBuilder) {
- if builder.target.arch == "aarch64" {
- builder.addPreUserArgs("-mharden-sls=all")
- }
-}
diff --git a/compiler_wrapper/aarch64_flags_test.go b/compiler_wrapper/aarch64_flags_test.go
deleted file mode 100644
index 0cb692e..0000000
--- a/compiler_wrapper/aarch64_flags_test.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2020 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package main
-
-import (
- "testing"
-)
-
-func TestAddSlsFlagOnAarch64(t *testing.T) {
- withTestContext(t, func(ctx *testContext) {
- cmd := ctx.must(callCompiler(ctx, ctx.cfg,
- ctx.newCommand(clangAarch64, mainCc)))
- if err := verifyArgOrder(cmd, "-mharden-sls=all", mainCc); err != nil {
- t.Error(err)
- }
- })
-}
diff --git a/compiler_wrapper/compiler_wrapper.go b/compiler_wrapper/compiler_wrapper.go
index 49ee0eb..aa52dfd 100644
--- a/compiler_wrapper/compiler_wrapper.go
+++ b/compiler_wrapper/compiler_wrapper.go
@@ -187,7 +187,6 @@
}
builder.addPostUserArgs(builder.cfg.clangPostFlags...)
calcCommonPreUserArgs(builder)
- processAarch64Flags(builder)
return processClangFlags(builder)
}
diff --git a/compiler_wrapper/testutil_test.go b/compiler_wrapper/testutil_test.go
index 8e2377e..21b7169 100644
--- a/compiler_wrapper/testutil_test.go
+++ b/compiler_wrapper/testutil_test.go
@@ -22,7 +22,6 @@
clangAndroid = "./clang"
clangTidyAndroid = "./clang-tidy"
clangX86_64 = "./x86_64-cros-linux-gnu-clang"
- clangAarch64 = "./aarch64-cros-linux-gnu-clang"
gccX86_64 = "./x86_64-cros-linux-gnu-gcc"
gccX86_64Eabi = "./x86_64-cros-eabi-gcc"
gccArmV7 = "./armv7m-cros-linux-gnu-gcc"