CHERIoT-llvm: cleanup toolchain wrappers
- Remove version info; it's not needed
- Fixup ar, nm, objdump, objcopy, and strip to point to the right filename
Bypass-Presubmit-Reason: sencha test passes; Nexus failure due to lab issues
Change-Id: I376f3d560274c1cb36adbec7e3e8dc7bf54684c2
diff --git a/toolchains/cheri_llvm/BUILD.bazel b/toolchains/cheri_llvm/BUILD.bazel
index 2953718..75e7ed7 100644
--- a/toolchains/cheri_llvm/BUILD.bazel
+++ b/toolchains/cheri_llvm/BUILD.bazel
@@ -30,13 +30,13 @@
},
substitutions = device.substitutions,
tools = {
- "ar": "wrappers/ar",
- "cpp": "wrappers/cpp",
- "gcc": "wrappers/clang",
- "ld": "wrappers/ld",
- "nm": "wrappers/nm",
+ "ar": "wrappers/ar",
+ "cpp": "wrappers/cpp",
+ "gcc": "wrappers/clang",
+ "ld": "wrappers/ld",
+ "nm": "wrappers/nm",
"objcopy": "wrappers/objcopy",
"objdump": "wrappers/objdump",
- "strip": "wrappers/strip",
+ "strip": "wrappers/strip",
},
) for device in DEVICES]
diff --git a/toolchains/cheri_llvm/wrappers/ar b/toolchains/cheri_llvm/wrappers/ar
new file mode 120000
index 0000000..31269c7
--- /dev/null
+++ b/toolchains/cheri_llvm/wrappers/ar
@@ -0,0 +1 @@
+llvm-driver.sh
\ No newline at end of file
diff --git a/toolchains/cheri_llvm/wrappers/driver.sh b/toolchains/cheri_llvm/wrappers/driver.sh
index 077cdff..72daf52 100755
--- a/toolchains/cheri_llvm/wrappers/driver.sh
+++ b/toolchains/cheri_llvm/wrappers/driver.sh
@@ -2,7 +2,6 @@
PROG=${0##*/}
TOOLCHAIN="cheriot-llvm"
-VERSION="13.0.0"
ARGS=()
POSTARGS=()
diff --git a/toolchains/cheri_llvm/wrappers/ar b/toolchains/cheri_llvm/wrappers/llvm-driver.sh
similarity index 65%
rename from toolchains/cheri_llvm/wrappers/ar
rename to toolchains/cheri_llvm/wrappers/llvm-driver.sh
index 0bf921d..92bfdb6 100755
--- a/toolchains/cheri_llvm/wrappers/ar
+++ b/toolchains/cheri_llvm/wrappers/llvm-driver.sh
@@ -1,12 +1,12 @@
#!/bin/bash --norc
+PROG=${0##*/}
TOOLCHAIN="cheriot-llvm"
-VERSION="13.0.0"
ARGS=()
POSTARGS=()
-exec "external/${TOOLCHAIN}/bin/llvm-ar" \
+exec "external/${TOOLCHAIN}/bin/llvm-${PROG}" \
"${ARGS[@]}" \
"$@"\
"${POSTARGS[@]}"
diff --git a/toolchains/cheri_llvm/wrappers/nm b/toolchains/cheri_llvm/wrappers/nm
index da2bdd9..31269c7 120000
--- a/toolchains/cheri_llvm/wrappers/nm
+++ b/toolchains/cheri_llvm/wrappers/nm
@@ -1 +1 @@
-driver.sh
\ No newline at end of file
+llvm-driver.sh
\ No newline at end of file
diff --git a/toolchains/cheri_llvm/wrappers/objcopy b/toolchains/cheri_llvm/wrappers/objcopy
deleted file mode 100755
index 79ec8cb..0000000
--- a/toolchains/cheri_llvm/wrappers/objcopy
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash --norc
-
-TOOLCHAIN="cheriot-llvm"
-VERSION="13.0.0"
-
-ARGS=()
-POSTARGS=()
-
-exec "external/${TOOLCHAIN}/bin/llvm-objcopy" \
- "${ARGS[@]}" \
- "$@"\
- "${POSTARGS[@]}"
diff --git a/toolchains/cheri_llvm/wrappers/objcopy b/toolchains/cheri_llvm/wrappers/objcopy
new file mode 120000
index 0000000..31269c7
--- /dev/null
+++ b/toolchains/cheri_llvm/wrappers/objcopy
@@ -0,0 +1 @@
+llvm-driver.sh
\ No newline at end of file
diff --git a/toolchains/cheri_llvm/wrappers/objdump b/toolchains/cheri_llvm/wrappers/objdump
index da2bdd9..31269c7 120000
--- a/toolchains/cheri_llvm/wrappers/objdump
+++ b/toolchains/cheri_llvm/wrappers/objdump
@@ -1 +1 @@
-driver.sh
\ No newline at end of file
+llvm-driver.sh
\ No newline at end of file
diff --git a/toolchains/cheri_llvm/wrappers/strip b/toolchains/cheri_llvm/wrappers/strip
index da2bdd9..31269c7 120000
--- a/toolchains/cheri_llvm/wrappers/strip
+++ b/toolchains/cheri_llvm/wrappers/strip
@@ -1 +1 @@
-driver.sh
\ No newline at end of file
+llvm-driver.sh
\ No newline at end of file