Skip to content

Commit c8f88c7

Browse files
committed
---
yaml --- r: 217527 b: refs/heads/tmp c: d6159b7 h: refs/heads/master i: 217525: 7b3bd53 217523: 1903cfd 217519: 0114e62 v: v3
1 parent 13d2843 commit c8f88c7

Some content is hidden

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

87 files changed

+728
-1381
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: 2ad26e850ed5dfedda8c96d7315aee50145ceedd
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 34f35a535aa45d17688bc977dd826e2e1d79cef4
28+
refs/heads/tmp: d6159b7fe0ce668b6875d4551019d3946ed8388c
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*.exe
2020
*.fn
2121
*.html
22-
*.kdev4
2322
*.ky
2423
*.ll
2524
*.llvm

branches/tmp/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
# * tidy-basic - show file / line stats
6363
# * tidy-errors - show the highest rustc error code
6464
# * tidy-features - show the status of language and lib features
65-
# * rustc-stage$(stage) - Only build up to a specific stage
6665
#
6766
# Then mix in some of these environment variables to harness the
6867
# ultimate power of The Rust Build System.
@@ -91,7 +90,7 @@
9190
#
9291
# # Rust recipes for build system success
9392
#
94-
# // Modifying libstd? Use this command to run unit tests just on your change
93+
# // Modifying libstd? Use this comment to run unit tests just on your change
9594
# make check-stage1-std NO_REBUILD=1 NO_BENCH=1
9695
#
9796
# // Added a run-pass test? Use this to test running your test

branches/tmp/configure

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ do
11141114
fi
11151115
;;
11161116

1117-
*-msvc)
1117+
x86_64-*-msvc)
11181118
# Currently the build system is not configured to build jemalloc
11191119
# with MSVC, so we omit this optional dependency.
11201120
step_msg "targeting MSVC, disabling jemalloc"
@@ -1154,45 +1154,22 @@ do
11541154
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11551155
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
11561156
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
1157-
putvar CFG_MSVC_ROOT
1158-
1159-
case $i in
1160-
x86_64-*)
1161-
bits=x86_64
1162-
msvc_part=amd64
1163-
;;
1164-
i686-*)
1165-
bits=i386
1166-
msvc_part=
1167-
;;
1168-
*)
1169-
err "can only target x86 targets for MSVC"
1170-
;;
1171-
esac
1172-
bindir="${CFG_MSVC_ROOT}/VC/bin"
1173-
if [ ! -z "$msvc_part" ]; then
1174-
bindir="$bindir/$msvc_part"
1175-
fi
1176-
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
1177-
eval CFG_MSVC_CL_$bits="\"$bindir/cl.exe\""
1178-
eval CFG_MSVC_LIB_$bits="\"$bindir/lib.exe\""
1179-
eval CFG_MSVC_LINK_$bits="\"$bindir/link.exe\""
1157+
CFG_MSVC_CL="${CFG_MSVC_ROOT}/VC/bin/amd64/cl.exe"
1158+
CFG_MSVC_LIB="${CFG_MSVC_ROOT}/VC/bin/amd64/lib.exe"
1159+
CFG_MSVC_LINK="${CFG_MSVC_ROOT}/VC/bin/amd64/link.exe"
11801160

11811161
vcvarsall="${CFG_MSVC_ROOT}/VC/vcvarsall.bat"
1182-
include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%")
1162+
CFG_MSVC_INCLUDE_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %INCLUDE%")
11831163
need_ok "failed to learn about MSVC's INCLUDE"
1184-
lib_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %LIB%")
1164+
CFG_MSVC_LIB_PATH=$(cmd /c "\"$vcvarsall\" amd64 && cmd /c echo %LIB%")
11851165
need_ok "failed to learn about MSVC's LIB"
11861166

1187-
eval CFG_MSVC_INCLUDE_PATH_${bits}="\"$include_path\""
1188-
eval CFG_MSVC_LIB_PATH_${bits}="\"$lib_path\""
1189-
1190-
putvar CFG_MSVC_BINDIR_${bits}
1191-
putvar CFG_MSVC_CL_${bits}
1192-
putvar CFG_MSVC_LIB_${bits}
1193-
putvar CFG_MSVC_LINK_${bits}
1194-
putvar CFG_MSVC_INCLUDE_PATH_${bits}
1195-
putvar CFG_MSVC_LIB_PATH_${bits}
1167+
putvar CFG_MSVC_ROOT
1168+
putvar CFG_MSVC_CL
1169+
putvar CFG_MSVC_LIB
1170+
putvar CFG_MSVC_LINK
1171+
putvar CFG_MSVC_INCLUDE_PATH
1172+
putvar CFG_MSVC_LIB_PATH
11961173
;;
11971174

11981175
*)
@@ -1431,19 +1408,8 @@ do
14311408

14321409
msg "configuring LLVM with:"
14331410
msg "$CMAKE_ARGS"
1434-
case "$t" in
1435-
x86_64-*)
1436-
generator="Visual Studio 12 2013 Win64"
1437-
;;
1438-
i686-*)
1439-
generator="Visual Studio 12 2013"
1440-
;;
1441-
*)
1442-
err "can only build LLVM for x86 platforms"
1443-
;;
1444-
esac
14451411
(cd $LLVM_BUILD_DIR && "$CFG_CMAKE" $CFG_LLVM_SRC_DIR \
1446-
-G "$generator" \
1412+
-G "Visual Studio 12 2013 Win64" \
14471413
$CMAKE_ARGS)
14481414
need_ok "LLVM cmake configure failed"
14491415
fi

branches/tmp/mk/cfg/i686-pc-windows-msvc.mk

Lines changed: 0 additions & 29 deletions
This file was deleted.

branches/tmp/mk/cfg/x86_64-pc-windows-msvc.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# x86_64-pc-windows-msvc configuration
2-
CC_x86_64-pc-windows-msvc="$(CFG_MSVC_CL_x86_64)" -nologo
3-
LINK_x86_64-pc-windows-msvc="$(CFG_MSVC_LINK_x86_64)" -nologo
4-
CXX_x86_64-pc-windows-msvc="$(CFG_MSVC_CL_x86_64)" -nologo
5-
CPP_x86_64-pc-windows-msvc="$(CFG_MSVC_CL_x86_64)" -nologo
6-
AR_x86_64-pc-windows-msvc="$(CFG_MSVC_LIB_x86_64)" -nologo
2+
CC_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
3+
LINK_x86_64-pc-windows-msvc="$(CFG_MSVC_LINK)" -nologo
4+
CXX_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
5+
CPP_x86_64-pc-windows-msvc="$(CFG_MSVC_CL)" -nologo
6+
AR_x86_64-pc-windows-msvc="$(CFG_MSVC_LIB)" -nologo
77
CFG_LIB_NAME_x86_64-pc-windows-msvc=$(1).dll
88
CFG_STATIC_LIB_NAME_x86_64-pc-windows-msvc=$(1).lib
99
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.{dll,lib}

branches/tmp/mk/platform.mk

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,23 @@ endef
239239
$(foreach target,$(CFG_TARGET), \
240240
$(eval $(call CFG_MAKE_TOOLCHAIN,$(target))))
241241

242+
# These two environment variables are scraped by the `./configure` script and
243+
# are necessary for `cl.exe` to find standard headers (the INCLUDE variable) and
244+
# for `link.exe` to find standard libraries (the LIB variable).
245+
ifdef CFG_MSVC_INCLUDE_PATH
246+
export INCLUDE := $(CFG_MSVC_INCLUDE_PATH)
247+
endif
248+
ifdef CFG_MSVC_LIB_PATH
249+
export LIB := $(CFG_MSVC_LIB_PATH)
250+
endif
251+
252+
# Unfortunately `link.exe` is also a program in `/usr/bin` on MinGW installs,
253+
# but it's not the one that we want. As a result we make sure that our detected
254+
# `link.exe` shows up in PATH first.
255+
ifdef CFG_MSVC_LINK
256+
export PATH := $(CFG_MSVC_ROOT)/VC/bin/amd64:$(PATH)
257+
endif
258+
242259
# There are more comments about this available in the target specification for
243260
# Windows MSVC in the compiler, but the gist of it is that we use `llvm-ar.exe`
244261
# instead of `lib.exe` for assembling archives, so we need to inject this custom
@@ -290,4 +307,3 @@ endef
290307

291308
$(foreach target,$(CFG_TARGET), \
292309
$(eval $(call ADD_RUSTC_LLVM_DEF_TO_MSVC,$(target))))
293-

branches/tmp/mk/rt.mk

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ 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
5757
ifeq ($$(findstring msvc,$(1)),msvc)
58-
ifeq ($$(findstring i686,$(1)),i686)
59-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_32.ll
60-
else
6158
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_64.ll
62-
endif
6359
else
6460
NATIVE_DEPS_rustrt_native_$(1) += rust_try.ll
6561
endif
@@ -97,17 +93,6 @@ $$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.S $$(MKFILE_DEPS) \
9793
@mkdir -p $$(@D)
9894
@$$(call E, compile: $$@)
9995
$$(Q)$$(call CFG_ASSEMBLE_$(1),$$@,$$<)
100-
101-
# On MSVC targets the compiler's default include path (e.g. where to find system
102-
# headers) is specified by the INCLUDE environment variable. This may not be set
103-
# so the ./configure script scraped the relevant values and this is the location
104-
# that we put them into cl.exe's environment.
105-
ifeq ($$(findstring msvc,$(1)),msvc)
106-
$$(RT_OUTPUT_DIR_$(1))/%.o: \
107-
export INCLUDE := $$(CFG_MSVC_INCLUDE_PATH_$$(HOST_$(1)))
108-
$(1)/rustllvm/%.o: \
109-
export INCLUDE := $$(CFG_MSVC_INCLUDE_PATH_$$(HOST_$(1)))
110-
endif
11196
endef
11297

11398
$(foreach target,$(CFG_TARGET),$(eval $(call NATIVE_LIBRARIES,$(target))))
@@ -255,12 +240,8 @@ COMPRT_CFLAGS_$(1) := $$(CFG_GCCISH_CFLAGS_$(1))
255240
ifeq ($$(findstring msvc,$(1)),msvc)
256241
COMPRT_CC_$(1) := gcc
257242
COMPRT_AR_$(1) := ar
258-
ifeq ($$(findstring i686,$(1)),i686)
259-
COMPRT_CFLAGS_$(1) := $$(CFG_GCCISH_CFLAGS_$(1)) -m32
260-
else
261243
COMPRT_CFLAGS_$(1) := $$(CFG_GCCISH_CFLAGS_$(1)) -m64
262244
endif
263-
endif
264245

265246
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
266247
@$$(call E, make: compiler-rt)

branches/tmp/mk/target.mk

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -220,40 +220,3 @@ $(foreach target,$(CFG_TARGET), \
220220
$(foreach crate,$(CRATES), \
221221
$(foreach tool,$(NATIVE_TOOL_DEPS_$(crate)_T_$(target)), \
222222
$(eval $(call MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR,0,$(target),$(BOOTSTRAP_FROM_$(target)),$(crate),$(tool))))))
223-
224-
# For MSVC targets we need to set up some environment variables for the linker
225-
# to work correctly when building Rust crates. These two variables are:
226-
#
227-
# - LIB tells the linker the default search path for finding system libraries,
228-
# for example kernel32.dll
229-
# - PATH needs to be modified to ensure that MSVC's link.exe is first in the
230-
# path instead of MinGW's /usr/bin/link.exe (entirely unrelated)
231-
#
232-
# The values for these variables are detected by the configure script.
233-
define SETUP_LIB_MSVC_ENV_VARS
234-
ifeq ($$(findstring msvc,$(2)),msvc)
235-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
236-
export LIB := $$(CFG_MSVC_LIB_PATH_$$(HOST_$(2)))
237-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
238-
export PATH := $$(CFG_MSVC_BINDIR_$$(HOST_$(2))):$$(PATH)
239-
endif
240-
endef
241-
define SETUP_TOOL_MSVC_ENV_VARS
242-
ifeq ($$(findstring msvc,$(2)),msvc)
243-
$$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
244-
export LIB := $$(CFG_MSVC_LIB_PATH_$$(HOST_$(2)))
245-
$$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
246-
export PATH := $$(CFG_MSVC_BINDIR_$$(HOST_$(2))):$$(PATH)
247-
endif
248-
endef
249-
250-
$(foreach host,$(CFG_HOST), \
251-
$(foreach target,$(CFG_TARGET), \
252-
$(foreach stage,$(STAGES), \
253-
$(foreach crate,$(CRATES), \
254-
$(eval $(call SETUP_LIB_MSVC_ENV_VARS,$(stage),$(target),$(host),$(crate)))))))
255-
$(foreach host,$(CFG_HOST), \
256-
$(foreach target,$(CFG_TARGET), \
257-
$(foreach stage,$(STAGES), \
258-
$(foreach tool,$(TOOLS), \
259-
$(eval $(call SETUP_TOOL_MSVC_ENV_VARS,$(stage),$(target),$(host),$(tool)))))))

branches/tmp/src/doc/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ series of small examples.
2020

2121
[rbe]: http://rustbyexample.com/
2222

23-
# The Standard Library
24-
25-
We have [API documentation for the entire standard
26-
library](std/index.html). There's a list of crates on the left with more
27-
specific sections, or you can use the search bar at the top to search for
28-
something if you know its name.
29-
3023
# Community & Getting Help
3124

3225
If you need help with something, or just want to talk about Rust with others,
@@ -82,6 +75,13 @@ There are questions that are asked quite often, so we've made FAQs for them:
8275
* [Project FAQ](complement-project-faq.html)
8376
* [How to submit a bug report](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports)
8477

78+
# The Standard Library
79+
80+
We have [API documentation for the entire standard
81+
library](std/index.html). There's a list of crates on the left with more
82+
specific sections, or you can use the search bar at the top to search for
83+
something if you know its name.
84+
8585
# The Error Index
8686

8787
If you encounter an error while compiling your code you may be able to look it

branches/tmp/src/doc/reference.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,11 @@ This is a list of behavior not considered *unsafe* in Rust terms, but that may
10471047
be undesired.
10481048

10491049
* Deadlocks
1050+
* Reading data from private fields (`std::repr`)
10501051
* Leaks of memory and other resources
10511052
* Exiting without calling destructors
1053+
* Sending signals
1054+
* Accessing/modifying the file system
10521055
* Integer overflow
10531056
- Overflow is considered "unexpected" behavior and is always user-error,
10541057
unless the `wrapping` primitives are used. In non-optimized builds, the compiler

branches/tmp/src/doc/trpl/references-and-borrowing.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ In other words, `y` is only valid for the scope where `x` exists. As soon as
336336
the borrow ‘doesn’t live long enough’ because it’s not valid for the right
337337
amount of time.
338338

339-
The same problem occurs when the reference is declared _before_ the variable it refers to:
339+
The same problem occurs when the reference is declared _before_ the variable it
340+
refers to. This is because resources within the same scope are freed in the
341+
opposite order they were declared:
340342

341343
```rust,ignore
342344
let y: &i32;
@@ -369,3 +371,6 @@ statement 1 at 3:14
369371
println!("{}", y);
370372
}
371373
```
374+
375+
In the above example, `y` is declared before `x`, meaning that `y` lives longer
376+
than `x`, which is not allowed.

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ two contexts. The first one is to mark a function as unsafe:
1212

1313
```rust
1414
unsafe fn danger_will_robinson() {
15-
// scary stuff
15+
// scary stuff
1616
}
1717
```
1818

@@ -68,8 +68,11 @@ Whew! That’s a bunch of stuff. It’s also important to notice all kinds of
6868
behaviors that are certainly bad, but are expressly _not_ unsafe:
6969

7070
* Deadlocks
71-
* Leaks of memory or other resources
71+
* Reading data from private fields
72+
* Leaks due to reference count cycles
7273
* Exiting without calling destructors
74+
* Sending signals
75+
* Accessing/modifying the file system
7376
* Integer overflow
7477

7578
Rust cannot prevent all kinds of software problems. Buggy code can and will be

branches/tmp/src/libcore/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ pub fn size_of_val<T: ?Sized>(val: &T) -> usize {
155155
/// ```
156156
#[inline]
157157
#[stable(feature = "rust1", since = "1.0.0")]
158-
#[deprecated(reason = "use `align_of` instead", since = "1.2.0")]
158+
#[deprecated(reason = "use `align_of` instead", since = "1.1.0")]
159159
pub fn min_align_of<T>() -> usize {
160160
unsafe { intrinsics::min_align_of::<T>() }
161161
}
@@ -171,7 +171,7 @@ pub fn min_align_of<T>() -> usize {
171171
/// ```
172172
#[inline]
173173
#[stable(feature = "rust1", since = "1.0.0")]
174-
#[deprecated(reason = "use `align_of_val` instead", since = "1.2.0")]
174+
#[deprecated(reason = "use `align_of_val` instead", since = "1.1.0")]
175175
pub fn min_align_of_val<T: ?Sized>(val: &T) -> usize {
176176
unsafe { intrinsics::min_align_of_val(val) }
177177
}

0 commit comments

Comments
 (0)