Skip to content

Commit 6e74488

Browse files
authored
Fix multi-file rlib conditional for macOS builds (#1021)
When building on macOS, GNU Make (`gmake`) treats quotes differently than on Linux hosts, which caused the outputted rlib file for *every* crate to be incorrectly treated as containing multiple object files. Currently, this is expected behavior for only one crate, `wasmtime-runtime`. Signed-off-by: Klimenty Tsoutsman <[email protected]>
1 parent 5c351a2 commit 6e74488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ build: $(nano_core_binary)
220220
## Note: we skip "normal" .rlib archives that have 2 members: a single .o object file and a single .rmeta file.
221221
## Note: the below line with `cut` simply removes the `lib` prefix and the `.rlib` suffix from the file name.
222222
@for f in $(shell find $(TARGET_DEPS_DIR)/ -name "*.rlib"); do \
223-
if [ "`$(CROSS)ar -t $${f} | wc -l`" != "2" ]; then \
223+
if [ `$(CROSS)ar -t $${f} | wc -l` != "2" ]; then \
224224
echo -e "\033[1;34mUnarchiving multi-file rlib: \033[0m $${f}" \
225225
&& mkdir -p "$(BUILD_DIR)/extracted_rlibs/`basename $${f}`-unpacked/" \
226226
&& $(CROSS)ar -xo --output "$(BUILD_DIR)/extracted_rlibs/`basename $${f}`-unpacked/" $${f} \

0 commit comments

Comments
 (0)