aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2021-01-31 20:49:25 -0800
committerManoj Gupta <manojgupta@chromium.org>2021-02-01 20:19:22 +0000
commitd4d6eb933c4c6c3699120ed131ccc38ec6a3b2fd (patch)
tree17e5118bdaf8e774fd334bda760407193351bcad /compiler_wrapper
parentcbc852e1f58da2a4eb07e8446d5a7a84c68621c1 (diff)
downloadtoolchain-utils-d4d6eb933c4c6c3699120ed131ccc38ec6a3b2fd.tar.gz
compiler_wrapper: Remove "-m32/movbe" from i686 handling
Clang handles "-i686" tuple fine linking i386 libraries if needed. "-mnomovbe" is also understood by current clang. BUG=None TEST=go test Change-Id: I0d5058ebe3cadca297af1c01030480cc25194955 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2665028 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'compiler_wrapper')
-rw-r--r--compiler_wrapper/clang_flags.go13
-rw-r--r--compiler_wrapper/clang_flags_test.go2
2 files changed, 2 insertions, 13 deletions
diff --git a/compiler_wrapper/clang_flags.go b/compiler_wrapper/clang_flags.go
index 53d70d50..e4d1e196 100644
--- a/compiler_wrapper/clang_flags.go
+++ b/compiler_wrapper/clang_flags.go
@@ -135,18 +135,7 @@ func processClangFlags(builder *commandBuilder) error {
linkerPath, env.getwd())
}
builder.addPostUserArgs("-B" + relLinkerPath)
- if startswithI86(builder.target.arch) {
- // TODO: -target i686-pc-linux-gnu causes clang to search for
- // libclang_rt.asan-i686.a which doesn't exist because it's packaged
- // as libclang_rt.asan-i386.a. We can't use -target i386-pc-linux-gnu
- // because then it would try to run i386-pc-linux-gnu-ld which doesn't
- // exist. Consider renaming the runtime library to use i686 in its name.
- builder.addPostUserArgs("-m32")
- // clang does not support -mno-movbe. This is the alternate way to do it.
- builder.addPostUserArgs("-Xclang", "-target-feature", "-Xclang", "-movbe")
- } else {
- builder.addPostUserArgs("-target", builder.target.target)
- }
+ builder.addPostUserArgs("-target", builder.target.target)
}
return nil
}
diff --git a/compiler_wrapper/clang_flags_test.go b/compiler_wrapper/clang_flags_test.go
index edeb15a4..bd87831c 100644
--- a/compiler_wrapper/clang_flags_test.go
+++ b/compiler_wrapper/clang_flags_test.go
@@ -235,7 +235,7 @@ func TestClangArchFlags(t *testing.T) {
compiler string
flags []string
}{
- {"./i686_64-cros-linux-gnu-clang", []string{mainCc, "-m32", "-Xclang", "-target-feature", "-Xclang", "-movbe"}},
+ {"./i686_64-cros-linux-gnu-clang", []string{mainCc, "-target", "i686_64-cros-linux-gnu"}},
{"./x86_64-cros-linux-gnu-clang", []string{mainCc, "-target", "x86_64-cros-linux-gnu"}},
}
for _, tt := range tests {