Skip to content

Commit

Permalink
Use echo instead of printf in __wasi_snapshot.h generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Aug 29, 2024
1 parent e5e2e9d commit 86b0fdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,10 @@ $(SYSROOT_INC)/bits/alltypes.h: $(LIBC_TOP_HALF_MUSL_DIR)/tools/mkalltypes.sed $
$(SYSROOT_INC)/__wasi_snapshot.h:
mkdir -p "$(SYSROOT_INC)"
ifeq ($(WASI_SNAPSHOT), p2)
printf '#ifndef __wasilibc_use_wasip2\n#define __wasilibc_use_wasip2\n#endif\n' \
echo '#ifndef __wasilibc_use_wasip2\n#define __wasilibc_use_wasip2\n#endif\n' \
> "$(SYSROOT_INC)/__wasi_snapshot.h"
else
printf '/* This file is (practically) empty by default. The Makefile will replace it\n with a non-empty version that defines `__wasilibc_use_wasip2` if targeting\n `wasm32-wasip2`.\n */\n\n' \
echo '/* This file is (practically) empty by default. The Makefile will replace it\n with a non-empty version that defines `__wasilibc_use_wasip2` if targeting\n `wasm32-wasip2`.\n */\n\n' \
> "$(SYSROOT_INC)/__wasi_snapshot.h"
endif

Expand Down

0 comments on commit 86b0fdb

Please sign in to comment.