-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,16 +72,16 @@ RUNTIME_CXXFLAGS_$(1)_$(2) = -D_RUST_STAGE1 | |
endif | ||
endif | ||
|
||
RUNTIME_CXXS_$(1)_$(2) := \ | ||
rt/rust_cxx_glue.cpp | ||
|
||
RUNTIME_CS_$(1)_$(2) := \ | ||
rt/rust_builtin.c \ | ||
rt/rust_upcall.c \ | ||
rt/miniz.c \ | ||
rt/rust_android_dummy.c \ | ||
rt/rust_test_helpers.c | ||
|
||
RUNTIME_LL_$(1)_$(2) := \ | ||
rt/rust_try.ll | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
# stage0 remove this after the next snapshot | ||
%.cpp: | ||
@touch tmp/foo.o | ||
|
@@ -94,18 +94,17 @@ RT_BUILD_DIR_$(1)_$(2) := $$(RT_OUTPUT_DIR_$(1))/stage$(2) | |
RUNTIME_DEF_$(1)_$(2) := $$(RT_OUTPUT_DIR_$(1))/rustrt$$(CFG_DEF_SUFFIX_$(1)) | ||
RUNTIME_INCS_$(1)_$(2) := -I $$(S)src/rt -I $$(S)src/rt/isaac -I $$(S)src/rt/uthash \ | ||
-I $$(S)src/rt/arch/$$(HOST_$(1)) | ||
RUNTIME_OBJS_$(1)_$(2) := $$(RUNTIME_CXXS_$(1)_$(2):rt/%.cpp=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) \ | ||
RUNTIME_OBJS_$(1)_$(2) := \ | ||
$$(RUNTIME_CS_$(1)_$(2):rt/%.c=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) \ | ||
$$(RUNTIME_S_$(1)_$(2):rt/%.S=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) | ||
$$(RUNTIME_S_$(1)_$(2):rt/%.S=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) \ | ||
$$(RUNTIME_LL_$(1)_$(2):rt/%.ll=$$(RT_BUILD_DIR_$(1)_$(2))/%.o) | ||
|
||
ALL_OBJ_FILES += $$(RUNTIME_OBJS_$(1)_$(2)) | ||
|
||
MORESTACK_OBJS_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/morestack.o | ||
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2)) | ||
|
||
$$(RT_BUILD_DIR_$(1)_$(2))/rust_cxx_glue.o: rt/rust_cxx_glue.cpp $$(MKFILE_DEPS) | ||
@$$(call E, compile: $$@) | ||
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \ | ||
$$(SNAP_DEFINES) $$(RUNTIME_CXXFLAGS_$(1)_$(2))) $$< | ||
LLVM_LLC = $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin/llc -filetype=obj -o $$1 $$2 | ||
|
||
$$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.c $$(MKFILE_DEPS) | ||
@$$(call E, compile: $$@) | ||
|
@@ -117,6 +116,11 @@ $$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.S $$(MKFILE_DEPS) \ | |
@$$(call E, compile: $$@) | ||
$$(Q)$$(call CFG_ASSEMBLE_$(1),$$@,$$<) | ||
|
||
$$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.ll $$(MKFILE_DEPS) \ | ||
$$(LLVM_CONFIG_$$(CFG_BUILD)) | ||
@$$(call E, compile: $$@) | ||
$$(Q)$$(call LLVM_LLC,$$@,$$<) | ||
This comment has been minimized.
Sorry, something went wrong.
alexcrichton
|
||
|
||
$$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJS_$(1)_$(2)) | ||
@$$(call E, link: $$@) | ||
$$(Q)$(AR_$(1)) rcs $$@ $$^ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -702,10 +702,7 @@ pub fn get_cc_prog(sess: Session) -> ~str { | |
// In the future, FreeBSD will use clang as default compiler. | ||
// It would be flexible to use cc (system's default C compiler) | ||
// instead of hard-coded gcc. | ||
// For win32, there is no cc command, so we add a condition to make it use | ||
// g++. We use g++ rather than gcc because it automatically adds linker | ||
// options required for generation of dll modules that correctly register | ||
// stack unwind tables. | ||
// For win32, there is no cc command, so we add a condition to make it use gcc. | ||
match sess.targ_cfg.os { | ||
abi::OsAndroid => match sess.opts.android_cross_path { | ||
Some(ref path) => format!("{}/bin/arm-linux-androideabi-gcc", *path), | ||
|
@@ -714,7 +711,7 @@ pub fn get_cc_prog(sess: Session) -> ~str { | |
(--android-cross-path)") | ||
} | ||
}, | ||
abi::OsWin32 => ~"g++", | ||
abi::OsWin32 => ~"gcc", | ||
_ => ~"cc", | ||
} | ||
} | ||
|
@@ -1023,6 +1020,12 @@ fn link_args(sess: Session, | |
} | ||
} | ||
|
||
if sess.targ_cfg.os == abi::OsWin32 { | ||
// Make sure that we link to the dynamic libgcc, otherwise cross-module | ||
// DWARF stack unwinding will not work. | ||
args.push(~"-shared-libgcc"); | ||
This comment has been minimized.
Sorry, something went wrong.
alexcrichton
|
||
} | ||
|
||
add_local_native_libraries(&mut args, sess); | ||
add_upstream_rust_crates(&mut args, sess, dylib, tmpdir); | ||
add_upstream_native_libraries(&mut args, sess); | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
#[crate_type = "dylib"]; | ||
#[crate_type = "rlib"]; | ||
|
||
#[feature(macro_rules, globs, struct_variant, managed_boxes)]; | ||
#[feature(macro_rules, globs, struct_variant, managed_boxes, link_args)]; | ||
This comment has been minimized.
Sorry, something went wrong.
alexcrichton
|
||
|
||
extern mod extra; | ||
extern mod syntax; | ||
|
@@ -92,7 +92,6 @@ pub mod back { | |
pub mod link; | ||
pub mod manifest; | ||
pub mod abi; | ||
pub mod upcall; | ||
pub mod arm; | ||
pub mod mips; | ||
pub mod x86; | ||
|
This is pretty slick.