Skip to content

Commit 36c3dec

Browse files
committed
---
yaml --- r: 110270 b: refs/heads/try c: bec333c h: refs/heads/master v: v3
1 parent 5f4a674 commit 36c3dec

File tree

360 files changed

+1271
-1601
lines changed

Some content is hidden

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

360 files changed

+1271
-1601
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: e415c25bcd81dc1f9a5a3d25d9b48ed2d545336b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c7fac4471201977fdb1c0c0a26c87287e12dc644
5-
refs/heads/try: 8610e4a7a0782c9407d9b9ac22de267a14f99b23
5+
refs/heads/try: bec333c4bc9d414c7f393adfdb8d8ab2d394bb37
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.h rust
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
8+
src/etc/pkg/rust-logo.png binary
89
src/rt/msvc/* -whitespace
910
src/rt/vg/* -whitespace
1011
src/rt/jemalloc/**/* -whitespace

branches/try/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-
384384
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
385385
opt rpath 1 "build rpaths into rustc itself"
386386
opt nightly 0 "build nightly packages"
387-
opt verify-install 1 "verify installed binaries work"
388387
valopt prefix "/usr/local" "set installation prefix"
389388
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
390389
valopt llvm-root "" "set LLVM root"

branches/try/mk/dist.mk

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,27 @@ dist-prepare-osx-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
160160
dist-prepare-osx-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
161161
dist-prepare-osx-$(1): prepare-base-osx-$(1)
162162

163-
dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt dist-prepare-osx-$(1)
163+
dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt \
164+
dist-prepare-osx-$(1) \
165+
tmp/dist/pkgres-$(1)/LICENSE.txt \
166+
tmp/dist/pkgres-$(1)/welcome.rtf \
167+
tmp/dist/pkgres-$(1)/rust-logo.png
164168
@$$(call E, making OS X pkg)
165169
$(Q)pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot-$(1) rust.pkg
166-
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml --resources . dist/$(PKG_NAME)-$(1).pkg
170+
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml \
171+
--resources tmp/dist/pkgres-$(1) dist/$(PKG_NAME)-$(1).pkg
167172
$(Q)rm -rf tmp rust.pkg
168173

174+
tmp/dist/pkgres-$(1)/LICENSE.txt: $(S)/LICENSE.txt
175+
@$$(call E,pkg resource LICENSE.txt)
176+
$(Q)mkdir -p $$(@D)
177+
$(Q)cp $$< $$@
178+
179+
tmp/dist/pkgres-$(1)/%: $(S)src/etc/pkg/%
180+
@$$(call E,pkg resource $$*)
181+
$(Q)mkdir -p $$(@D)
182+
$(Q)cp -r $$< $$@
183+
169184
endef
170185

171186
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))

branches/try/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ ifeq ($(CFG_LLNEXTGEN),)
232232
else
233233
.PHONY: verify-grammar
234234

235-
doc/rust.g: $(D)/rust.md $(S)src/etc/extract_grammar.py
235+
doc/rust.g: rust.md $(S)src/etc/extract_grammar.py
236236
@$(call E, extract_grammar: $@)
237237
$(Q)$(CFG_PYTHON) $(S)src/etc/extract_grammar.py $< >$@
238238

branches/try/mk/install.mk

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,14 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11-
ifdef CFG_DISABLE_VERIFY_INSTALL
12-
MAYBE_DISABLE_VERIFY=--disable-verify
13-
else
14-
MAYBE_DISABLE_VERIFY=
15-
endif
1611

1712
install: dist-install-dir-$(CFG_BUILD)
18-
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
13+
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)" --libdir="$(CFG_LIBDIR)" --mandir="$(CFG_MANDIR)"
1914
# Remove tmp files while we can because they may have been created under sudo
2015
$(Q)rm -R tmp/dist/$(PKG_NAME)-$(CFG_BUILD)
2116

2217
uninstall: dist-install-dir-$(CFG_BUILD)
23-
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
24-
# Remove tmp files while we can because they may have been created under sudo
25-
$(Q)rm -R tmp/dist/$(PKG_NAME)-$(CFG_BUILD)
18+
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(CFG_PREFIX)" --libdir="$(CFG_LIBDIR)" --mandir="$(CFG_MANDIR)"
2619

2720

2821
######################################################################

branches/try/src/compiletest/compiletest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![crate_type = "bin"]
12-
#![feature(phase)]
11+
#[crate_type = "bin"];
12+
#[feature(phase)];
1313

14-
#![allow(non_camel_case_types)]
15-
#![deny(warnings)]
14+
#[allow(non_camel_case_types)];
15+
#[deny(warnings)];
1616

1717
extern crate test;
1818
extern crate getopts;

branches/try/src/doc/rust.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Some productions are defined by exclusion of particular Unicode characters:
153153
~~~~ {.notrust .ebnf .gram}
154154
comment : block_comment | line_comment ;
155155
block_comment : "/*" block_comment_body * '*' + '/' ;
156-
block_comment_body : [block_comment | character] * ;
156+
block_comment_body : (block_comment | character) * ;
157157
line_comment : "//" non_eol * ;
158158
~~~~
159159

@@ -205,7 +205,6 @@ The keywords are the following strings:
205205
~~~~ {.notrust .keyword}
206206
as
207207
break
208-
crate
209208
do
210209
else enum extern
211210
false fn for
@@ -497,16 +496,16 @@ All of the above extensions are expressions with values.
497496
## Macros
498497

499498
~~~~ {.notrust .ebnf .gram}
500-
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ;
501-
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';' ;
499+
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')'
500+
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';'
502501
matcher : '(' matcher * ')' | '[' matcher * ']'
503502
| '{' matcher * '}' | '$' ident ':' ident
504503
| '$' '(' matcher * ')' sep_token? [ '*' | '+' ]
505-
| non_special_token ;
504+
| non_special_token
506505
transcriber : '(' transcriber * ')' | '[' transcriber * ']'
507506
| '{' transcriber * '}' | '$' ident
508507
| '$' '(' transcriber * ')' sep_token? [ '*' | '+' ]
509-
| non_special_token ;
508+
| non_special_token
510509
~~~~
511510

512511
User-defined syntax extensions are called "macros",
@@ -803,7 +802,7 @@ use_decl : "pub" ? "use" ident [ '=' path
803802
804803
path_glob : ident [ "::" path_glob ] ?
805804
| '*'
806-
| '{' ident [ ',' ident ] * '}' ;
805+
| '{' ident [ ',' ident ] * '}'
807806
~~~~
808807

809808
A _use declaration_ creates one or more local name bindings synonymous
@@ -1458,7 +1457,7 @@ impl Seq<bool> for u32 {
14581457
### External blocks
14591458

14601459
~~~~ {.notrust .ebnf .gram}
1461-
extern_block_item : "extern" '{' extern_block '}' ;
1460+
extern_block_item : "extern" '{' extern_block '} ;
14621461
extern_block : [ foreign_fn ] * ;
14631462
~~~~
14641463

@@ -1684,7 +1683,7 @@ import public items from their destination, not private items.
16841683

16851684
~~~~ {.notrust .ebnf .gram}
16861685
attribute : '#' '[' attr_list ']' ;
1687-
attr_list : attr [ ',' attr_list ]* ;
1686+
attr_list : attr [ ',' attr_list ]*
16881687
attr : ident [ '=' literal
16891688
| '(' attr_list ')' ] ? ;
16901689
~~~~
@@ -2332,7 +2331,7 @@ struct_expr : expr_path '{' ident ':' expr
23322331
[ ".." expr ] '}' |
23332332
expr_path '(' expr
23342333
[ ',' expr ] * ')' |
2335-
expr_path ;
2334+
expr_path
23362335
~~~~
23372336

23382337
There are several forms of structure expressions.
@@ -2383,7 +2382,7 @@ Point3d {y: 0, z: 10, .. base};
23832382
~~~~ {.notrust .ebnf .gram}
23842383
block_expr : '{' [ view_item ] *
23852384
[ stmt ';' | item ] *
2386-
[ expr ] '}' ;
2385+
[ expr ] '}'
23872386
~~~~
23882387

23892388
A _block expression_ is similar to a module in terms of the declarations that
@@ -2410,7 +2409,7 @@ or dynamically dispatching if the left-hand-side expression is an indirect [obje
24102409
### Field expressions
24112410

24122411
~~~~ {.notrust .ebnf .gram}
2413-
field_expr : expr '.' ident ;
2412+
field_expr : expr '.' ident
24142413
~~~~
24152414

24162415
A _field expression_ consists of an expression followed by a single dot and an identifier,
@@ -2432,9 +2431,9 @@ it is automatically dereferenced to make the field access possible.
24322431
### Vector expressions
24332432

24342433
~~~~ {.notrust .ebnf .gram}
2435-
vec_expr : '[' "mut" ? vec_elems? ']' ;
2434+
vec_expr : '[' "mut" ? vec_elems? ']'
24362435
2437-
vec_elems : [expr [',' expr]*] | [expr ',' ".." expr] ;
2436+
vec_elems : [expr [',' expr]*] | [expr ',' ".." expr]
24382437
~~~~
24392438

24402439
A [_vector_](#vector-types) _expression_ is written by enclosing zero or
@@ -2454,7 +2453,7 @@ as a [literal](#literals) or a [static item](#static-items).
24542453
### Index expressions
24552454

24562455
~~~~ {.notrust .ebnf .gram}
2457-
idx_expr : expr '[' expr ']' ;
2456+
idx_expr : expr '[' expr ']'
24582457
~~~~
24592458

24602459
[Vector](#vector-types)-typed expressions can be indexed by writing a
@@ -2876,7 +2875,7 @@ then any `else` block is executed.
28762875
~~~~ {.notrust .ebnf .gram}
28772876
match_expr : "match" expr '{' match_arm [ '|' match_arm ] * '}' ;
28782877
2879-
match_arm : match_pat "=>" [ expr "," | '{' block '}' ] ;
2878+
match_arm : match_pat '=>' [ expr "," | '{' block '}' ] ;
28802879
28812880
match_pat : pat [ ".." pat ] ? [ "if" expr ] ;
28822881
~~~~

branches/try/src/etc/install.sh

Lines changed: 11 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,6 @@ validate_opt () {
189189
done
190190
}
191191

192-
absolutify() {
193-
FILE_PATH="${1}"
194-
FILE_PATH_DIRNAME="$(dirname ${FILE_PATH})"
195-
FILE_PATH_BASENAME="$(basename ${FILE_PATH})"
196-
FILE_ABS_PATH="$(cd ${FILE_PATH_DIRNAME} && pwd)"
197-
FILE_PATH="${FILE_ABS_PATH}/${FILE_PATH_BASENAME}"
198-
# This is the return value
199-
ABSOLUTIFIED="${FILE_PATH}"
200-
}
201-
202192
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
203193
CFG_SELF="$0"
204194
CFG_ARGS="$@"
@@ -222,7 +212,6 @@ BOOL_OPTIONS=""
222212
VAL_OPTIONS=""
223213

224214
flag uninstall "only uninstall from the installation prefix"
225-
opt verify 1 "verify that the installed binaries run correctly"
226215
valopt prefix "/usr/local" "set installation prefix"
227216
# NB This isn't quite the same definition as in `configure`.
228217
# just using 'lib' instead of CFG_LIBDIR_RELATIVE
@@ -241,50 +230,28 @@ validate_opt
241230

242231
# OK, let's get installing ...
243232

244-
# Sanity check: can we run the binaries?
245-
if [ -z "${CFG_DISABLE_VERIFY}" ]
246-
then
247-
# Don't do this if uninstalling. Failure here won't help in any way.
248-
if [ -z "${CFG_UNINSTALL}" ]
249-
then
250-
msg "verifying platform can run binaries"
251-
"${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
252-
if [ $? -ne 0 ]
253-
then
254-
err "can't execute rustc binary on this platform"
255-
fi
256-
fi
257-
fi
258-
259233
# Sanity check: can we can write to the destination?
260-
msg "verifying destination is writable"
261234
umask 022 && mkdir -p "${CFG_LIBDIR}"
262-
need_ok "can't write to destination. consider \`sudo\`."
263-
touch "${CFG_LIBDIR}/rust-install-probe" > /dev/null
235+
need_ok "can't write to destination. consider 'sudo'."
236+
touch "${CFG_LIBDIR}/rust-install-probe" 2> /dev/null
264237
if [ $? -ne 0 ]
265238
then
266-
err "can't write to destination. consider \`sudo\`."
239+
err "can't write to destination. consider 'sudo'."
267240
fi
268-
rm -f "${CFG_LIBDIR}/rust-install-probe"
241+
rm "${CFG_LIBDIR}/rust-install-probe"
269242
need_ok "failed to remove install probe"
270243

271244
# Sanity check: don't install to the directory containing the installer.
272245
# That would surely cause chaos.
273-
msg "verifying destination is not the same as source"
274246
INSTALLER_DIR="$(cd $(dirname $0) && pwd)"
275247
PREFIX_DIR="$(cd ${CFG_PREFIX} && pwd)"
276248
if [ "${INSTALLER_DIR}" = "${PREFIX_DIR}" ]
277249
then
278250
err "can't install to same directory as installer"
279251
fi
280252

281-
# Using an absolute path to libdir in a few places so that the status
282-
# messages are consistently using absolute paths.
283-
absolutify "${CFG_LIBDIR}"
284-
ABS_LIBDIR="${ABSOLUTIFIED}"
285-
286253
# The file name of the manifest we're going to create during install
287-
INSTALLED_MANIFEST="${ABS_LIBDIR}/rustlib/manifest"
254+
INSTALLED_MANIFEST="${CFG_LIBDIR}/rustlib/manifest"
288255

289256
# First, uninstall from the installation prefix.
290257
# Errors are warnings - try to rm everything in the manifest even if some fail.
@@ -296,7 +263,7 @@ then
296263
msg "removing $p"
297264
if [ -f "$p" ]
298265
then
299-
rm -f "$p"
266+
rm "$p"
300267
if [ $? -ne 0 ]
301268
then
302269
warn "failed to remove $p"
@@ -306,16 +273,8 @@ then
306273
fi
307274
done < "${INSTALLED_MANIFEST}"
308275

309-
# If we fail to remove rustlib below, then the installed manifest will
310-
# still be full; the installed manifest needs to be empty before install.
311-
msg "removing ${INSTALLED_MANIFEST}"
312-
rm -f "${INSTALLED_MANIFEST}"
313-
# For the above reason, this is a hard error
314-
need_ok "failed to remove installed manifest"
315-
316276
# Remove 'rustlib' directory
317-
msg "removing ${ABS_LIBDIR}/rustlib"
318-
rm -Rf "${ABS_LIBDIR}/rustlib"
277+
rm -r "${CFG_LIBDIR}/rustlib"
319278
if [ $? -ne 0 ]
320279
then
321280
warn "failed to remove rustlib"
@@ -339,9 +298,7 @@ fi
339298

340299
# Create the installed manifest, which we will fill in with absolute file paths
341300
mkdir -p "${CFG_LIBDIR}/rustlib"
342-
need_ok "failed to create rustlib"
343301
touch "${INSTALLED_MANIFEST}"
344-
need_ok "failed to create installed manifest"
345302

346303
# Now install, iterate through the new manifest and copy files
347304
while read p; do
@@ -367,8 +324,10 @@ while read p; do
367324

368325
# Make the path absolute so we can uninstall it later without
369326
# starting from the installation cwd
370-
absolutify "${FILE_INSTALL_PATH}"
371-
FILE_INSTALL_PATH="${ABSOLUTIFIED}"
327+
FILE_INSTALL_PATH_DIRNAME="$(dirname ${FILE_INSTALL_PATH})"
328+
FILE_INSTALL_PATH_BASENAME="$(basename ${FILE_INSTALL_PATH})"
329+
FILE_INSTALL_ABS_PATH="$(cd ${FILE_INSTALL_PATH_DIRNAME} && pwd)"
330+
FILE_INSTALL_PATH="${FILE_INSTALL_ABS_PATH}/${FILE_INSTALL_PATH_BASENAME}"
372331

373332
# Install the file
374333
msg "${FILE_INSTALL_PATH}"
@@ -387,22 +346,6 @@ while read p; do
387346
# The manifest lists all files to install
388347
done < "${CFG_SRC_DIR}/lib/rustlib/manifest.in"
389348

390-
# Sanity check: can we run the installed binaries?
391-
if [ -z "${CFG_DISABLE_VERIFY}" ]
392-
then
393-
msg "verifying installed binaries are executable"
394-
"${CFG_PREFIX}/bin/rustc" --version > /dev/null
395-
if [ $? -ne 0 ]
396-
then
397-
ERR="can't execute installed rustc binary. "
398-
ERR="${ERR}installation may be broken. "
399-
ERR="${ERR}if this is expected then rerun install.sh with \`--disable-verify\` "
400-
ERR="${ERR}or \`make install\` with \`--disable-verify-install\`"
401-
err "${ERR}"
402-
fi
403-
fi
404-
405-
406349
echo
407350
echo " Rust is ready to roll."
408351
echo

branches/try/src/etc/pkg/Distribution.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@
1414
<line choice="org.rust-lang.rust"/>
1515
</line>
1616
</choices-outline>
17-
<choice id="default"/>
17+
<choice id="default"
18+
customLocation="usr/local"/>
1819
<choice id="org.rust-lang.rust" visible="false">
1920
<pkg-ref id="org.rust-lang.rust"/>
2021
</choice>
2122
<pkg-ref id="org.rust-lang.rust" version="0" onConclusion="none">rust.pkg</pkg-ref>
23+
<welcome file="welcome.rtf" mime-type="text/enriched"/>
24+
<background file="rust-logo.png" mime-type="image/png"
25+
alignment="bottomleft"/>
2226
</installer-gui-script>
5.71 KB
Loading

0 commit comments

Comments
 (0)