File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 51
51
else
52
52
curl -f -OL --retry 5 https://github.com/bytecodealliance/wasm-tools/releases/download/wasm-tools-1.0.54/wasm-tools-1.0.54-x86_64-macos.tar.gz
53
53
tar xf wasm-tools-1.0.54-x86_64-macos.tar.gz
54
- cp wasm-tools-1.0.54-x86_64-macos/wasm-tools ~/.wasmtime/bin/
54
+ cp wasm-tools-1.0.54-x86_64-macos/wasm-tools ~/.wasmtime/bin/
55
55
fi
56
56
- uses : actions/checkout@v3
57
57
with :
90
90
- arch : x64
91
91
sys : clang64
92
92
env : clang-x86_64
93
+ rust_target : x86_64-pc-windows-msvc
93
94
- arch : x86
94
95
sys : clang32
95
96
env : clang-i686
97
+ rust_target : i686-pc-windows-msvc
96
98
steps :
97
99
- uses : actions/cache@v3
98
100
with :
@@ -112,14 +114,15 @@ jobs:
112
114
msystem : ${{ matrix.sys }}
113
115
update : true
114
116
release : false
117
+ path-type : inherit
115
118
- uses : actions/checkout@v3
116
119
with :
117
120
fetch-depth : 0
118
121
- run : git submodule update --init --depth 32 --jobs 3
119
122
- name : Build
120
123
shell : msys2 {0}
121
124
run : |
122
- make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON
125
+ make package LLVM_CMAKE_FLAGS=-DLLVM_CCACHE_BUILD=ON RUST_TARGET=${{ matrix.rust_target }}
123
126
make check
124
127
- name : Does it work sans msys2?
125
128
run : |
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ override LLVM_CMAKE_FLAGS += -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
44
44
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
45
45
endif
46
46
47
+ RUST_TARGET ?= $(lastword $(shell rustc -vV | grep host) )
48
+
47
49
# Only the major version is needed for Clang, see https://reviews.llvm.org/D125860.
48
50
CLANG_VERSION =$(shell $(BASH ) ./llvm_version_major.sh $(LLVM_PROJ_DIR ) )
49
51
VERSION: =$(shell $(BASH ) ./version.sh)
@@ -254,14 +256,16 @@ build/config.BUILT:
254
256
touch build/config.BUILT
255
257
256
258
define COPY_SHIMS_FOR
257
- cp ./src/ clang-shims/target /release/clang-shims$(EXE_SUFFIX ) \
259
+ cp $( BUILD_PREFIX ) / clang-shims/$( RUST_TARGET ) /release/clang-shims$(EXE_SUFFIX ) \
258
260
$(BUILD_PREFIX ) /bin/$(1 ) -clang
259
- cp ./src/ clang-shims/target /release/clang-shims$(EXE_SUFFIX ) \
261
+ cp $( BUILD_PREFIX ) / clang-shims/$( RUST_TARGET ) /release/clang-shims$(EXE_SUFFIX ) \
260
262
$(BUILD_PREFIX ) /bin/$(1 ) -clang++
261
263
endef
262
264
263
265
build/clang-shims.BUILT : build/llvm.BUILT
264
- cargo build --release --manifest-path ./src/clang-shims/Cargo.toml
266
+ CARGO_TARGET_DIR=$(BUILD_PREFIX ) /clang-shims \
267
+ cargo build --release --manifest-path ./src/clang-shims/Cargo.toml \
268
+ --target $(RUST_TARGET )
265
269
$(call COPY_SHIMS_FOR,wasm32-wasi)
266
270
$(call COPY_SHIMS_FOR,wasm32-wasi-preview2)
267
271
$(call COPY_SHIMS_FOR,wasm32-wasi-threads)
You can’t perform that action at this time.
0 commit comments