Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to the WIP Rust port of compiler-rt #37802

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
path = src/llvm
url = https://github.com/rust-lang/llvm.git
branch = master
[submodule "src/compiler-rt"]
path = src/compiler-rt
url = https://github.com/rust-lang/compiler-rt.git
[submodule "src/rt/hoedown"]
path = src/rt/hoedown
url = https://github.com/rust-lang/hoedown.git
Expand All @@ -17,3 +14,6 @@
[submodule "src/liblibc"]
path = src/liblibc
url = https://github.com/rust-lang/libc.git
[submodule "src/libcompiler_builtins"]
path = src/libcompiler_builtins
url = git://github.com/rust-lang-nursery/compiler-builtins.git
1 change: 1 addition & 0 deletions mk/crates.mk
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ $(foreach crate,$(TOOLS),$(eval $(call RUST_TOOL,$(crate))))

CRATEFILE_libc := $(SREL)src/liblibc/src/lib.rs
RUSTFLAGS_libc := --cfg stdbuild
CRATEFILE_compiler_builtins := $(SREL)src/libcompiler_builtins/src/lib.rs
29 changes: 3 additions & 26 deletions mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ COMPRT_OBJS_$(1) += \
arm/clzsi2.o \
arm/comparesf2.o \
arm/divmodsi4.o \
arm/divsi3.o \
arm/modsi3.o \
arm/switch16.o \
arm/switch32.o \
Expand Down Expand Up @@ -400,13 +399,9 @@ endif

$(foreach intrinsic,absvdi2.o \
absvsi2.o \
adddf3.o \
addsf3.o \
addvdi3.o \
addvsi3.o \
apple_versioning.o \
ashldi3.o \
ashrdi3.o \
clear_cache.o \
clzdi2.o \
clzsi2.o \
Expand All @@ -417,12 +412,8 @@ $(foreach intrinsic,absvdi2.o \
ctzsi2.o \
divdc3.o \
divdf3.o \
divdi3.o \
divmoddi4.o \
divmodsi4.o \
divsc3.o \
divsf3.o \
divsi3.o \
divxc3.o \
extendsfdf2.o \
extendhfsf2.o \
Expand All @@ -449,14 +440,8 @@ $(foreach intrinsic,absvdi2.o \
floatunsidf.o \
floatunsisf.o \
int_util.o \
lshrdi3.o \
moddi3.o \
modsi3.o \
muldc3.o \
muldf3.o \
muldi3.o \
mulodi4.o \
mulosi4.o \
muloti4.o \
mulsc3.o \
mulsf3.o \
Expand All @@ -472,8 +457,6 @@ $(foreach intrinsic,absvdi2.o \
paritysi2.o \
popcountdi2.o \
popcountsi2.o \
powidf2.o \
powisf2.o \
powixf2.o \
subdf3.o \
subsf3.o \
Expand All @@ -482,13 +465,7 @@ $(foreach intrinsic,absvdi2.o \
truncdfhf2.o \
truncdfsf2.o \
truncsfhf2.o \
ucmpdi2.o \
udivdi3.o \
udivmoddi4.o \
udivmodsi4.o \
udivsi3.o \
umoddi3.o \
umodsi3.o,
ucmpdi2.o,
$(call ADD_INTRINSIC,$(1),$(intrinsic)))

ifeq ($$(findstring ios,$(1)),)
Expand Down Expand Up @@ -585,12 +562,12 @@ endif

COMPRT_OBJS_$(1) := $$(COMPRT_OBJS_$(1):%=$$(COMPRT_BUILD_DIR_$(1))/%)

$$(COMPRT_BUILD_DIR_$(1))/%.o: $(S)src/compiler-rt/lib/builtins/%.c
$$(COMPRT_BUILD_DIR_$(1))/%.o: $(S)src/libcompiler_builtins/compiler-rt/compiler-rt-cdylib/compiler-rt/lib/builtins/%.c
@mkdir -p $$(@D)
@$$(call E, compile: $$@)
$$(Q)$$(call CFG_COMPILE_C_$(1),$$@,$$<)

$$(COMPRT_BUILD_DIR_$(1))/%.o: $(S)src/compiler-rt/lib/builtins/%.S \
$$(COMPRT_BUILD_DIR_$(1))/%.o: $(S)src/libcompiler_builtins/compiler-rt/compiler-rt-cdylib/compiler-rt/lib/builtins/%.S \
$$(LLVM_CONFIG_$$(CFG_BUILD))
@mkdir -p $$(@D)
@$$(call E, compile: $$@)
Expand Down
3 changes: 2 additions & 1 deletion mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ $(eval $(call RUST_CRATE,coretest))
DEPS_collectionstest :=
$(eval $(call RUST_CRATE,collectionstest))

# compiler_builtins is tested out of tree
TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system libc \
alloc_jemalloc panic_unwind \
alloc_jemalloc panic_unwind compiler_builtins \
panic_abort,$(TARGET_CRATES)) \
collectionstest coretest
TEST_DOC_CRATES = $(DOC_CRATES) arena flate fmt_macros getopts graphviz \
Expand Down
7 changes: 7 additions & 0 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ impl Build {
.args(&["clean", "-fdx"]));
},
State::NotInitialized => {
self.run(git_submodule().arg("init").arg(submodule.path));
self.run(git_submodule().arg("update").arg(submodule.path));
self.run(git_submodule().arg("update").arg("--recursive").arg("--init")
.arg(submodule.path));
},
State::OutOfSync => {
// drops submodule commits that weren't reported to the (outer) git repository
Expand Down
1 change: 0 additions & 1 deletion src/compiler-rt
Submodule compiler-rt deleted from 3bc027
1 change: 1 addition & 0 deletions src/libcompiler_builtins
Submodule libcompiler_builtins added at ab0693
16 changes: 0 additions & 16 deletions src/libcompiler_builtins/Cargo.toml

This file was deleted.

Loading