Skip to content

Commit ec7679b

Browse files
authored
Auto merge of #36764 - jonathandturner:rollup, r=jonathandturner
Rollup of 14 pull requests - Successful merges: #36563, #36574, #36586, #36662, #36663, #36669, #36676, #36721, #36723, #36727, #36729, #36742, #36754, #36756 - Failed merges:
2 parents d0623cf + e832762 commit ec7679b

Some content is hidden

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

68 files changed

+1710
-1061
lines changed

configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@ case $CFG_OSTYPE in
437437
CFG_CPUTYPE=$(isainfo -n)
438438
;;
439439

440+
Haiku)
441+
CFG_OSTYPE=unknown-haiku
442+
;;
443+
440444
MINGW*)
441445
# msys' `uname` does not print gcc configuration, but prints msys
442446
# configuration. so we cannot believe `uname -m`:
@@ -532,6 +536,10 @@ case $CFG_CPUTYPE in
532536
CFG_CPUTYPE=x86_64
533537
;;
534538

539+
BePC)
540+
CFG_CPUTYPE=i686
541+
;;
542+
535543
*)
536544
err "unknown CPU type: $CFG_CPUTYPE"
537545
esac

mk/cfg/i686-unknown-haiku.mk

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# i686-unknown-haiku configuration
2+
CROSS_PREFIX_i686-unknown-haiku=i586-pc-haiku-
3+
CC_i686-unknown-haiku=$(CC)
4+
CXX_i686-unknown-haiku=$(CXX)
5+
CPP_i686-unknown-haiku=$(CPP)
6+
AR_i686-unknown-haiku=$(AR)
7+
CFG_LIB_NAME_i686-unknown-haiku=lib$(1).so
8+
CFG_STATIC_LIB_NAME_i686-unknown-haiku=lib$(1).a
9+
CFG_LIB_GLOB_i686-unknown-haiku=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_i686-unknown-haiku=lib$(1)-*.dylib.dSYM
11+
CFG_CFLAGS_i686-unknown-haiku := -m32 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_i686-unknown-haiku := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_i686-unknown-haiku := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_i686-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m32
15+
CFG_GCCISH_PRE_LIB_FLAGS_i686-unknown-haiku := -Wl,-whole-archive
16+
CFG_GCCISH_POST_LIB_FLAGS_i686-unknown-haiku := -Wl,-no-whole-archive
17+
CFG_DEF_SUFFIX_i686-unknown-haiku := .linux.def
18+
CFG_LLC_FLAGS_i686-unknown-haiku :=
19+
CFG_INSTALL_NAME_i686-unknown-haiku =
20+
CFG_EXE_SUFFIX_i686-unknown-haiku =
21+
CFG_WINDOWSY_i686-unknown-haiku :=
22+
CFG_UNIXY_i686-unknown-haiku := 1
23+
CFG_PATH_MUNGE_i686-unknown-haiku := true
24+
CFG_LDPATH_i686-unknown-haiku :=
25+
CFG_RUN_i686-unknown-haiku=$(2)
26+
CFG_RUN_TARG_i686-unknown-haiku=$(call CFG_RUN_i686-unknown-haiku,,$(2))
27+
CFG_GNU_TRIPLE_i686-unknown-haiku := i686-unknown-haiku

mk/cfg/x86_64-unknown-haiku.mk

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# x86_64-unknown-haiku configuration
2+
CROSS_PREFIX_x86_64-unknown-haiku=x86_64-unknown-haiku-
3+
CC_x86_64-unknown-haiku=$(CC)
4+
CXX_x86_64-unknown-haiku=$(CXX)
5+
CPP_x86_64-unknown-haiku=$(CPP)
6+
AR_x86_64-unknown-haiku=$(AR)
7+
CFG_LIB_NAME_x86_64-unknown-haiku=lib$(1).so
8+
CFG_STATIC_LIB_NAME_x86_64-unknown-haiku=lib$(1).a
9+
CFG_LIB_GLOB_x86_64-unknown-haiku=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_x86_64-unknown-haiku=lib$(1)-*.dylib.dSYM
11+
CFG_CFLAGS_x86_64-unknown-haiku := -m64 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_x86_64-unknown-haiku := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_x86_64-unknown-haiku := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-haiku := -shared -fPIC -ldl -pthread -lrt -g -m64
15+
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-haiku := -Wl,-whole-archive
16+
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-haiku := -Wl,-no-whole-archive
17+
CFG_DEF_SUFFIX_x86_64-unknown-haiku := .linux.def
18+
CFG_LLC_FLAGS_x86_64-unknown-haiku :=
19+
CFG_INSTALL_NAME_x86_64-unknown-haiku =
20+
CFG_EXE_SUFFIX_x86_64-unknown-haiku =
21+
CFG_WINDOWSY_x86_64-unknown-haiku :=
22+
CFG_UNIXY_x86_64-unknown-haiku := 1
23+
CFG_PATH_MUNGE_x86_64-unknown-haiku := true
24+
CFG_LDPATH_x86_64-unknown-haiku :=
25+
CFG_RUN_x86_64-unknown-haiku=$(2)
26+
CFG_RUN_TARG_x86_64-unknown-haiku=$(call CFG_RUN_x86_64-unknown-haiku,,$(2))
27+
CFG_GNU_TRIPLE_x86_64-unknown-haiku := x86_64-unknown-haiku

mk/main.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,14 @@ ifeq ($$(OSTYPE_$(3)),apple-darwin)
512512
else
513513
ifeq ($$(CFG_WINDOWSY_$(3)),1)
514514
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := PATH
515+
else
516+
ifeq ($$(OSTYPE_$(3)),unknown-haiku)
517+
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := LIBRARY_PATH
515518
else
516519
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := LD_LIBRARY_PATH
517520
endif
518521
endif
522+
endif
519523

520524
LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \
521525
$$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib

src/bootstrap/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,14 @@ impl Build {
243243
// Almost all of these are simple one-liners that shell out to the
244244
// corresponding functionality in the extra modules, where more
245245
// documentation can be found.
246-
for target in step::all(self) {
246+
let steps = step::all(self);
247+
248+
self.verbose("bootstrap build plan:");
249+
for step in &steps {
250+
self.verbose(&format!("{:?}", step));
251+
}
252+
253+
for target in steps {
247254
let doc_out = self.out.join(&target.target).join("doc");
248255
match target.src {
249256
Llvm { _dummy } => {

src/bootstrap/step.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ targets!(define_source);
171171
/// into a topologically sorted list which when executed left-to-right will
172172
/// correctly sequence the entire build.
173173
pub fn all(build: &Build) -> Vec<Step> {
174+
build.verbose("inferred build steps:");
175+
174176
let mut ret = Vec::new();
175177
let mut all = HashSet::new();
176178
for target in top_level(build) {
@@ -184,6 +186,7 @@ pub fn all(build: &Build) -> Vec<Step> {
184186
set: &mut HashSet<Step<'a>>) {
185187
if set.insert(target.clone()) {
186188
for dep in target.deps(build) {
189+
build.verbose(&format!("{:?}\n -> {:?}", target, dep));
187190
fill(build, &dep, ret, set);
188191
}
189192
ret.push(target.clone());

src/doc/book/getting-started.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,13 @@ $ cd hello_world
230230
231231
## Writing and Running a Rust Program
232232

233-
Next, make a new source file and call it *main.rs*. Rust files always end
234-
in a *.rs* extension. If you’re using more than one word in your filename, use
235-
an underscore to separate them; for example, you'd use *hello_world.rs* rather
236-
than *helloworld.rs*.
233+
We need to create a source file for our Rust program. Rust files always end
234+
in a *.rs* extension. If you are using more than one word in your filename,
235+
use an underscore to separate them; for example, you would use
236+
*my_program.rs* rather than *myprogram.rs*.
237237

238-
Now open the *main.rs* file you just created, and type the following code:
238+
Now, make a new file and call it *main.rs*. Open the file and type
239+
the following code:
239240

240241
```rust
241242
fn main() {

src/etc/local_stage0.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LIB_PREFIX=lib
1818

1919
OS=`uname -s`
2020
case $OS in
21-
("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS")
21+
("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS"|"Haiku")
2222
BIN_SUF=
2323
LIB_SUF=.so
2424
;;

src/librustc/middle/intrinsicck.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,16 @@ impl<'a, 'gcx, 'tcx> ExprVisitor<'a, 'gcx, 'tcx> {
103103
}
104104
};
105105

106-
span_err!(self.infcx.tcx.sess, span, E0512,
106+
struct_span_err!(self.infcx.tcx.sess, span, E0512,
107107
"transmute called with differently sized types: \
108108
{} ({}) to {} ({})",
109109
from, skeleton_string(from, sk_from),
110-
to, skeleton_string(to, sk_to));
110+
to, skeleton_string(to, sk_to))
111+
.span_label(span,
112+
&format!("transmuting between {} and {}",
113+
skeleton_string(from, sk_from),
114+
skeleton_string(to, sk_to)))
115+
.emit();
111116
}
112117
}
113118

0 commit comments

Comments
 (0)