Skip to content

Commit 341dac4

Browse files
committed
---
yaml --- r: 225071 b: refs/heads/stable c: b56d47c h: refs/heads/master i: 225069: 4709a7d 225067: 814fc76 225063: 27ffb30 225055: 3ed1028 v: v3
1 parent 4bced5f commit 341dac4

File tree

5 files changed

+64
-15
lines changed

5 files changed

+64
-15
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: 7cf0b1798bddad33876258d6715b363896252e40
32+
refs/heads/stable: b56d47cc80a7df471c0e2f96fa62a3e3983972ec
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/configure

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,39 @@ do
13481348
done
13491349
fi
13501350

1351-
if [ ${do_reconfigure} -ne 0 ]
1351+
use_cmake=0
1352+
case "$t" in
1353+
(*-msvc)
1354+
use_cmake=1
1355+
;;
1356+
esac
1357+
1358+
if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -ne 0 ]
1359+
then
1360+
msg "configuring LLVM for $t with cmake"
1361+
1362+
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1363+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1364+
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
1365+
else
1366+
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
1367+
fi
1368+
if [ -z "$CFG_ENABLE_LLVM_ASSERTIONS" ]
1369+
then
1370+
CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_ASSERTIONS=OFF"
1371+
else
1372+
CMAKE_ARGS="$CMAKE_ARGS -DLLVM_ENABLE_ASSERTIONS=ON"
1373+
fi
1374+
1375+
msg "configuring LLVM with:"
1376+
msg "$CMAKE_ARGS"
1377+
(cd $LLVM_BUILD_DIR && "$CFG_CMAKE" $CFG_LLVM_SRC_DIR \
1378+
-G "Visual Studio 12 2013 Win64" \
1379+
$CMAKE_ARGS)
1380+
need_ok "LLVM cmake configure failed"
1381+
fi
1382+
1383+
if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -eq 0 ]
13521384
then
13531385
# LLVM's configure doesn't recognize the new Windows triples yet
13541386
gnu_t=$(to_gnu_triple $t)

branches/stable/mk/clean.mk

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,3 @@ $(foreach host, $(CFG_HOST), \
118118
$(eval $(foreach target, $(CFG_TARGET), \
119119
$(eval $(foreach stage, 0 1 2 3, \
120120
$(eval $(call CLEAN_TARGET_STAGE_N,$(stage),$(target),$(host))))))))
121-
122-
define DEF_CLEAN_LLVM_HOST
123-
ifeq ($(CFG_LLVM_ROOT),)
124-
clean-llvm$(1):
125-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) clean
126-
else
127-
clean-llvm$(1): ;
128-
129-
endif
130-
endef
131-
132-
$(foreach host, $(CFG_HOST), \
133-
$(eval $(call DEF_CLEAN_LLVM_HOST,$(host))))

branches/stable/mk/llvm.mk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,43 @@ LLVM_DEPS_INC=$(call rwildcard,$(CFG_LLVM_SRC_DIR)include,*cpp *hpp)
1919
LLVM_DEPS=$(LLVM_DEPS_SRC) $(LLVM_DEPS_INC)
2020
endif
2121

22+
ifdef CFG_DISABLE_OPTIMIZE_LLVM
23+
LLVM_BUILD_CONFIG_MODE := Debug
24+
else
25+
LLVM_BUILD_CONFIG_MODE := Release
26+
endif
27+
2228
define DEF_LLVM_RULES
2329

2430
# If CFG_LLVM_ROOT is defined then we don't build LLVM ourselves
2531
ifeq ($(CFG_LLVM_ROOT),)
2632

2733
LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2834

35+
ifeq ($$(findstring msvc,$(1)),msvc)
36+
37+
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
38+
@$$(call E, cmake: llvm)
39+
$$(Q)$$(CFG_CMAKE) --build $$(CFG_LLVM_BUILD_DIR_$(1)) \
40+
--config $$(LLVM_BUILD_CONFIG_MODE)
41+
$$(Q)touch $$(LLVM_CONFIG_$(1))
42+
43+
clean-llvm$(1):
44+
45+
else
46+
2947
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3048
@$$(call E, make: llvm)
3149
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1)) ONLY_TOOLS="$$(LLVM_TOOLS)"
3250
$$(Q)touch $$(LLVM_CONFIG_$(1))
51+
52+
clean-llvm$(1):
53+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) clean
54+
55+
endif
56+
57+
else
58+
clean-llvm$(1):
3359
endif
3460

3561
# This is used to independently force an LLVM clean rebuild

branches/stable/mk/main.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,13 @@ LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
299299
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
300300
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
301301
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
302+
ifeq ($$(findstring freebsd,$(1)),freebsd)
302303
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),
303304
# so we replace -I with -iquote to ensure that it searches bundled LLVM first.
304305
LLVM_CXXFLAGS_$(1)=$$(subst -I, -iquote , $$(shell "$$(LLVM_CONFIG_$(1))" --cxxflags))
306+
else
307+
LLVM_CXXFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --cxxflags)
308+
endif
305309
LLVM_HOST_TRIPLE_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --host-target)
306310

307311
LLVM_AS_$(1)=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-as$$(X_$(1))

0 commit comments

Comments
 (0)