Skip to content

Commit 064d798

Browse files
alexcrichtonsunfishcode
authored andcommitted
Use patsubst instead of subst
This helps handling when `clang` shows up in not only the file name but also directory name for where the `clang` executable is located. When figuring out the path to `wasm-nm` and `wasm-ar` we want to replace just the final component, not all `clang` words.
1 parent bd5ac03 commit 064d798

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# These variables are specifically meant to be overridable via
22
# the make command-line.
33
WASM_CC = clang
4-
WASM_NM = $(subst clang,llvm-nm,$(WASM_CC))
5-
WASM_AR = $(subst clang,llvm-ar,$(WASM_CC))
4+
WASM_NM = $(patsubst %clang,%llvm-nm,$(WASM_CC))
5+
WASM_AR = $(patsubst %clang,%llvm-ar,$(WASM_CC))
66
WASM_CFLAGS = -O2
77
# The directory where we build the sysroot.
88
SYSROOT = $(CURDIR)/sysroot

0 commit comments

Comments
 (0)