Skip to content

Commit 4e16b33

Browse files
committed
---
yaml --- r: 225074 b: refs/heads/stable c: 64412a4 h: refs/heads/master v: v3
1 parent e944072 commit 4e16b33

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: ee64bab76cdaa375cc015a5eb3e3fd7581d2a7b3
32+
refs/heads/stable: 64412a49bed9d6a743ed4d9108fc2da49ed5e9a9
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/mk/rt.mk

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,18 +226,32 @@ COMPRT_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
226226
COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
227227
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
228228

229+
# Note that on MSVC-targeting builds we hardwire CC/AR to gcc/ar even though
230+
# we're targeting MSVC. This is because although compiler-rt has a CMake build
231+
# config I can't actually figure out how to use it, so I'm not sure how to use
232+
# cl.exe to build the objects. Additionally, the compiler-rt library when built
233+
# with gcc has the same ABI as cl.exe, so they're largely compatible
234+
COMPRT_CC_$(1) := $$(CC_$(1))
235+
COMPRT_AR_$(1) := $$(AR_$(1))
236+
COMPRT_CFLAGS_$(1) := $$(CFG_GCCISH_CFLAGS_$(1))
237+
ifeq ($$(findstring msvc,$(1)),msvc)
238+
COMPRT_CC_$(1) := gcc
239+
COMPRT_AR_$(1) := ar
240+
COMPRT_CFLAGS_$(1) := $$(CFG_GCCISH_CFLAGS_$(1)) -m64
241+
endif
242+
229243
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
230244
@$$(call E, make: compiler-rt)
231245
$$(Q)$$(MAKE) -C "$(S)src/compiler-rt" \
232246
ProjSrcRoot="$(S)src/compiler-rt" \
233247
ProjObjRoot="$$(abspath $$(COMPRT_BUILD_DIR_$(1)))" \
234-
CC="$$(CC_$(1))" \
235-
AR="$$(AR_$(1))" \
236-
RANLIB="$$(AR_$(1)) s" \
237-
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1))" \
248+
CC='$$(COMPRT_CC_$(1))' \
249+
AR='$$(COMPRT_AR_$(1))' \
250+
RANLIB='$$(COMPRT_AR_$(1)) s' \
251+
CFLAGS="$$(COMPRT_CFLAGS_$(1))" \
238252
TargetTriple=$(1) \
239253
triple-builtins
240-
$$(Q)cp $$(COMPRT_BUILD_DIR_$(1))/triple/builtins/libcompiler_rt.a $$(COMPRT_LIB_$(1))
254+
$$(Q)cp $$(COMPRT_BUILD_DIR_$(1))/triple/builtins/libcompiler_rt.a $$@
241255

242256
################################################################################
243257
# libbacktrace

0 commit comments

Comments
 (0)