Skip to content

Commit 5e5ca69

Browse files
committed
---
yaml --- r: 221158 b: refs/heads/tmp c: 6bdfb05 h: refs/heads/master v: v3
1 parent d102550 commit 5e5ca69

File tree

200 files changed

+2034
-4739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+2034
-4739
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: c8bab9d06a179028a0d5129aa62f09d694d9cc49
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 25281b121ff809f35a6abd7d2d115995436c3319
28+
refs/heads/tmp: 6bdfb0534737b371e3b3e4abdec2f5dffd629916
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/configure

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -323,17 +323,6 @@ envopt() {
323323
fi
324324
}
325325

326-
enable_if_not_disabled() {
327-
local OP=$1
328-
local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
329-
local ENAB_V="CFG_ENABLE_$UOP"
330-
local EXPLICITLY_DISABLED="CFG_DISABLE_${UOP}_PROVIDED"
331-
eval VV=\$$EXPLICITLY_DISABLED
332-
if [ -z "$VV" ]; then
333-
eval $ENAB_V=1
334-
fi
335-
}
336-
337326
to_llvm_triple() {
338327
case $1 in
339328
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -682,12 +671,10 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
682671
CFG_DISABLE_OPTIMIZE=1
683672
CFG_DISABLE_OPTIMIZE_CXX=1
684673
fi
685-
686-
# Set following variables to 1 unless setting already provided
687-
enable_if_not_disabled debug-assertions
688-
enable_if_not_disabled debug-jemalloc
689-
enable_if_not_disabled debuginfo
690-
enable_if_not_disabled llvm-assertions
674+
CFG_ENABLE_DEBUG_ASSERTIONS=1
675+
CFG_ENABLE_DEBUG_JEMALLOC=1
676+
CFG_ENABLE_DEBUGINFO=1
677+
CFG_ENABLE_LLVM_ASSERTIONS=1
691678
fi
692679

693680
# OK, now write the debugging options

branches/tmp/mk/rt.mk

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ NATIVE_DEPS_miniz_$(1) = miniz.c
5454
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5555
rust_android_dummy.c
5656
NATIVE_DEPS_rustrt_native_$(1) := arch/$$(HOST_$(1))/record_sp.S
57+
ifeq ($$(findstring msvc,$(1)),msvc)
58+
ifeq ($$(findstring i686,$(1)),i686)
59+
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_32.ll
60+
else
61+
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_64.ll
62+
endif
63+
else
64+
NATIVE_DEPS_rustrt_native_$(1) += rust_try.ll
65+
endif
5766
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
5867
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
5968

@@ -67,6 +76,14 @@ NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6776

6877
RT_OUTPUT_DIR_$(1) := $(1)/rt
6978

79+
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \
80+
$$(LLVM_CONFIG_$$(CFG_BUILD))
81+
@mkdir -p $$(@D)
82+
@$$(call E, compile: $$@)
83+
$$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \
84+
-filetype=obj -mtriple=$$(CFG_LLVM_TARGET_$(1)) \
85+
-relocation-model=pic -o $$@ $$<
86+
7087
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
7188
@mkdir -p $$(@D)
7289
@$$(call E, compile: $$@)
@@ -105,6 +122,7 @@ define THIRD_PARTY_LIB
105122
OBJS_$(2)_$(1) := $$(NATIVE_DEPS_$(2)_$(1):%=$$(RT_OUTPUT_DIR_$(1))/%)
106123
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.c=.o)
107124
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.cpp=.o)
125+
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.ll=.o)
108126
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.S=.o)
109127
NATIVE_$(2)_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),$(2))
110128
$$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1)): $$(OBJS_$(2)_$(1))

branches/tmp/src/doc/trpl/testing.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,11 @@ that our tests are entirely left out of a normal build.
250250

251251
The second change is the `use` declaration. Because we're in an inner module,
252252
we need to bring our test function into scope. This can be annoying if you have
253-
a large module, and so this is a common use of globs. Let's change our
254-
`src/lib.rs` to make use of it:
253+
a large module, and so this is a common use of the `glob` feature. Let's change
254+
our `src/lib.rs` to make use of it:
255255

256256
```rust,ignore
257+
257258
pub fn add_two(a: i32) -> i32 {
258259
a + 2
259260
}

branches/tmp/src/etc/debugger_pretty_printers_common.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@
5555
SLICE_FIELD_NAMES = [SLICE_FIELD_NAME_DATA_PTR, SLICE_FIELD_NAME_LENGTH]
5656

5757
# std::Vec<> related constants
58+
STD_VEC_FIELD_NAME_DATA_PTR = "ptr"
5859
STD_VEC_FIELD_NAME_LENGTH = "len"
59-
STD_VEC_FIELD_NAME_BUF = "buf"
60-
STD_VEC_FIELD_NAMES = [STD_VEC_FIELD_NAME_BUF,
61-
STD_VEC_FIELD_NAME_LENGTH]
60+
STD_VEC_FIELD_NAME_CAPACITY = "cap"
61+
STD_VEC_FIELD_NAMES = [STD_VEC_FIELD_NAME_DATA_PTR,
62+
STD_VEC_FIELD_NAME_LENGTH,
63+
STD_VEC_FIELD_NAME_CAPACITY]
6264

6365
# std::String related constants
6466
STD_STRING_FIELD_NAMES = ["vec"]
@@ -300,13 +302,13 @@ def get_discriminant_value_as_integer(enum_val):
300302
def extract_length_ptr_and_cap_from_std_vec(vec_val):
301303
assert vec_val.type.get_type_kind() == TYPE_KIND_STD_VEC
302304
length_field_index = STD_VEC_FIELD_NAMES.index(STD_VEC_FIELD_NAME_LENGTH)
303-
buf_field_index = STD_VEC_FIELD_NAMES.index(STD_VEC_FIELD_NAME_BUF)
305+
ptr_field_index = STD_VEC_FIELD_NAMES.index(STD_VEC_FIELD_NAME_DATA_PTR)
306+
cap_field_index = STD_VEC_FIELD_NAMES.index(STD_VEC_FIELD_NAME_CAPACITY)
304307

305308
length = vec_val.get_child_at_index(length_field_index).as_integer()
306-
buf = vec_val.get_child_at_index(buf_field_index)
309+
vec_ptr_val = vec_val.get_child_at_index(ptr_field_index)
310+
capacity = vec_val.get_child_at_index(cap_field_index).as_integer()
307311

308-
vec_ptr_val = buf.get_child_at_index(0)
309-
capacity = buf.get_child_at_index(1).as_integer()
310312
unique_ptr_val = vec_ptr_val.get_child_at_index(0)
311313
data_ptr = unique_ptr_val.get_child_at_index(0)
312314
assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR

branches/tmp/src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use core::hash::{self, Hash};
6262
use core::marker::Unsize;
6363
use core::mem;
6464
use core::ops::{CoerceUnsized, Deref, DerefMut};
65-
use core::ptr::Unique;
65+
use core::ptr::{Unique};
6666
use core::raw::{TraitObject};
6767

6868
/// A value that represents the heap. This is the default place that the `box`

branches/tmp/src/liballoc/lib.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
#![feature(unique)]
8989
#![feature(unsafe_no_drop_flag, filling_drop)]
9090
#![feature(unsize)]
91-
#![feature(core_slice_ext)]
9291

9392
#![cfg_attr(test, feature(test, alloc, rustc_private, box_raw))]
9493
#![cfg_attr(all(not(feature = "external_funcs"), not(feature = "external_crate")),
@@ -123,7 +122,6 @@ mod boxed { pub use std::boxed::{Box, HEAP}; }
123122
mod boxed_test;
124123
pub mod arc;
125124
pub mod rc;
126-
pub mod raw_vec;
127125

128126
/// Common out-of-memory routine
129127
#[cold]
@@ -135,3 +133,20 @@ pub fn oom() -> ! {
135133
// allocate.
136134
unsafe { core::intrinsics::abort() }
137135
}
136+
137+
// FIXME(#14344): When linking liballoc with libstd, this library will be linked
138+
// as an rlib (it only exists as an rlib). It turns out that an
139+
// optimized standard library doesn't actually use *any* symbols
140+
// from this library. Everything is inlined and optimized away.
141+
// This means that linkers will actually omit the object for this
142+
// file, even though it may be needed in the future.
143+
//
144+
// To get around this for now, we define a dummy symbol which
145+
// will never get inlined so the stdlib can call it. The stdlib's
146+
// reference to this symbol will cause this library's object file
147+
// to get linked in to libstd successfully (the linker won't
148+
// optimize it out).
149+
#[doc(hidden)]
150+
#[unstable(feature = "issue_14344_fixme")]
151+
#[cfg(stage0)]
152+
pub fn fixme_14344_be_sure_to_link_to_collections() {}

0 commit comments

Comments
 (0)