Skip to content

Rolling up PRs in the queue #20360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Dec 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e6c8b8f
Added `get_address_name`, an interface to `getnameinfo`
murarth Dec 28, 2014
86d6359
Don't promise that we talk about Rustdoc more
steveklabnik Dec 26, 2014
f4ad02f
collections: use Unique in btree::Node
seanmonstar Dec 30, 2014
011b5ca
Fix impl of Send and Sync for mips
epall Dec 30, 2014
56c26ab
mk: Allow an optional number to come after the beta version label
brson Dec 30, 2014
f253002
mk: The beta channel temporarily produced alpha versions
brson Dec 30, 2014
cd31e6f
Forbid static methods in object safe traits
nrc Dec 30, 2014
69716ef
Tests
nrc Dec 30, 2014
82ebd2b
librustc_trans: Remove some dead code now that procs are gone.
luqmana Dec 25, 2014
8fb25ab
PR#20326 : Issue#20322: Adding unsafe Send and Sync traits implementa…
Dec 30, 2014
b7832ed
Implement `Clone` for a large number of iterators & other adaptors.
huonw Dec 30, 2014
c3ff803
iOS: fallout of Sync oibit
vhbit Dec 30, 2014
b41a24f
Handle function calls to integers in model lexer correctly
fhahn Dec 30, 2014
42ae6bb
Minor change to wording in `Variables and Bindings`
js-ojus Dec 30, 2014
f066acf
src/grammar/check.sh now prints test summary
fhahn Dec 30, 2014
1e278c1
Update src/grammar/README.md
fhahn Dec 30, 2014
91a0e18
debuginfo: Add a rust-gdb shell script that will start GDB with Rust …
michaelwoerister Dec 3, 2014
be00b9d
Moved ReducedGraphParent building to a new module
Dec 30, 2014
20fcece
mk: The alpha will not have a cycle number
brson Dec 30, 2014
28659cf
Cleanup unused imports resulting from move of reduced graph building
Dec 30, 2014
096df4e
Purged ReducedGraphParent
Dec 30, 2014
c7a8240
Removed a bunch of unnecessary .clone()s from build_reduced_graph
Dec 30, 2014
1d26fb9
Remove core::atomic::Ordering::* public reexport
frewsxcv Dec 30, 2014
1131acb
mk: Append -src to source tarballs for easier identification
brson Dec 30, 2014
8a5057a
std::iter: Add partition and unzip methods to iterators
aturon Dec 17, 2014
9d919d2
Second pass stabilization: vec
aturon Dec 17, 2014
4f863a3
Second pass stabilization: slice
aturon Dec 18, 2014
e91d810
Libs: Unify concat and concat_vec
aturon Nov 3, 2014
6e1879e
Adjustments from review
aturon Dec 29, 2014
c11e155
Add verbose option to rustdoc in order to fix problem with --version
fhahn Dec 30, 2014
9e224c2
std: Re-enable at_exit()
alexcrichton Dec 19, 2014
b94bcbf
Stabilize cmp
aturon Dec 30, 2014
262c1ef
Register new snapshots
alexcrichton Dec 30, 2014
fe64ff1
rollup merge of #19954: michaelwoerister/rust-gdb
alexcrichton Dec 31, 2014
3c5fd40
rollup merge of #20045: alexcrichton/issue-20012
alexcrichton Dec 31, 2014
836bcb6
rollup merge of #20065: aturon/stab-2-cmp
alexcrichton Dec 31, 2014
0362b40
rollup merge of #20115: gereeter/split-module-building
alexcrichton Dec 31, 2014
520cdcb
rollup merge of #20217: luqmana/pc
alexcrichton Dec 31, 2014
2dd5192
rollup merge of #20247: steveklabnik/gh20088
alexcrichton Dec 31, 2014
b936fb3
rollup merge of #20286: murarth/get-address-name
alexcrichton Dec 31, 2014
360c3cf
rollup merge of #20316: seanmonstar/patch-1
alexcrichton Dec 31, 2014
d1a19e8
rollup merge of #20321: epall/patch-1
alexcrichton Dec 31, 2014
a239d71
rollup merge of #20323: brson/beta
alexcrichton Dec 31, 2014
d058520
rollup merge of #20325: nick29581/obj-safety-static
alexcrichton Dec 31, 2014
899eb65
rollup merge of #20326: rohitjoshi/master
alexcrichton Dec 31, 2014
a8820f7
rollup merge of #20328: huonw/attack-of-the-clones
alexcrichton Dec 31, 2014
ecf48fb
rollup merge of #20329: vhbit/ios-rand-fix
alexcrichton Dec 31, 2014
fa130ae
rollup merge of #20330: fhahn/issue-15877-model-lexer-range-2
alexcrichton Dec 31, 2014
86a03b8
rollup merge of #20332: js-ojus/master
alexcrichton Dec 31, 2014
04f4221
rollup merge of #20344: brson/srctarballs
alexcrichton Dec 31, 2014
38f9805
rollup merge of #20348: frewsxcv/rm-reexports
alexcrichton Dec 31, 2014
49f14d3
rollup merge of #20350: fhahn/issue-20340-rustdoc-version
alexcrichton Dec 31, 2014
dd0f29a
rollup merge of #20353: alexcrichton/snapshots
alexcrichton Dec 31, 2014
6abfac0
Fallout from stabilization
aturon Dec 30, 2014
67d1388
rollup merge of #20061: aturon/stab-2-vec-slice
alexcrichton Dec 31, 2014
582cba1
Test fixes and rebase conflicts
alexcrichton Dec 31, 2014
aec67c2
Revert "std: Re-enable at_exit()"
alexcrichton Dec 31, 2014
139f44b
rollup merge of #20375: brson/windistfix
alexcrichton Dec 31, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mk/clean.mk
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ clean-generic-$(2)-$(1):
-name '*.dll' -o \
-name '*.def' -o \
-name '*.py' -o \
-name '*.pyc' -o \
-name '*.bc' \
\) \
| xargs rm -f
Expand All @@ -79,7 +80,7 @@ define CLEAN_HOST_STAGE_N

clean$(1)_H_$(2): \
$$(foreach crate,$$(CRATES),clean$(1)_H_$(2)-lib-$$(crate)) \
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_H_$(2)-tool-$$(tool))
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_H_$(2)-tool-$$(tool))
$$(Q)rm -fr $(2)/rt/libbacktrace

clean$(1)_H_$(2)-tool-%:
Expand All @@ -99,7 +100,7 @@ define CLEAN_TARGET_STAGE_N

clean$(1)_T_$(2)_H_$(3): \
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix
Expand Down
101 changes: 88 additions & 13 deletions mk/debuggers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,77 @@
# Copy debugger related scripts
######################################################################

DEBUGGER_RUSTLIB_ETC_SCRIPTS=lldb_rust_formatters.py
DEBUGGER_BIN_SCRIPTS=rust-lldb

DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS=$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS), \
$(CFG_SRC_DIR)src/etc/$(script))
DEBUGGER_BIN_SCRIPTS_ABS=$(foreach script,$(DEBUGGER_BIN_SCRIPTS), \
$(CFG_SRC_DIR)src/etc/$(script))
## GDB ##
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB=gdb_load_rust_pretty_printers.py \
gdb_rust_pretty_printing.py
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS=\
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB), \
$(CFG_SRC_DIR)src/etc/$(script))

DEBUGGER_BIN_SCRIPTS_GDB=rust-gdb
DEBUGGER_BIN_SCRIPTS_GDB_ABS=\
$(foreach script,$(DEBUGGER_BIN_SCRIPTS_GDB), \
$(CFG_SRC_DIR)src/etc/$(script))


## LLDB ##
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS=\
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB), \
$(CFG_SRC_DIR)src/etc/$(script))

DEBUGGER_BIN_SCRIPTS_LLDB=rust-lldb
DEBUGGER_BIN_SCRIPTS_LLDB_ABS=\
$(foreach script,$(DEBUGGER_BIN_SCRIPTS_LLDB), \
$(CFG_SRC_DIR)src/etc/$(script))


## ALL ##
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB) \
$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB)
DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS)
DEBUGGER_BIN_SCRIPTS_ALL=$(DEBUGGER_BIN_SCRIPTS_GDB) \
$(DEBUGGER_BIN_SCRIPTS_LLDB)
DEBUGGER_BIN_SCRIPTS_ALL_ABS=$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) \
$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)

DEBUGGER_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $(DEBUGGER_BIN_SCRIPTS_ABS)

# $(1) - the stage to copy to
# $(2) - the host triple
define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST

tmp/install-debugger-scripts$(1)_H_$(2).done: $$(DEBUGGER_SCRIPTS_ALL)
tmp/install-debugger-scripts$(1)_H_$(2)-gdb.done: \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(HBIN$(1)_H_$(2))
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)touch $$@

tmp/install-debugger-scripts$(1)_H_$(2)-lldb.done: \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(HBIN$(1)_H_$(2))
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)touch $$@

tmp/install-debugger-scripts$(1)_H_$(2)-all.done: \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(HBIN$(1)_H_$(2))
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(HBIN$(1)_H_$(2))
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
$(Q)touch $$@

tmp/install-debugger-scripts$(1)_H_$(2)-none.done:
$(Q)touch $$@

endef

# Expand host make-targets for all stages
Expand All @@ -44,12 +95,36 @@ $(foreach stage,$(STAGES), \
# $(3) is the host triple
define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET

tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done: $$(DEBUGGER_SCRIPTS_ALL)
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-gdb.done: \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)install $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)touch $$@

tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-lldb.done: \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)install $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)touch $$@

tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-all.done: \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
$(Q)touch $$@

tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-none.done:
$(Q)touch $$@

endef

# Expand target make-targets for all stages
Expand Down
2 changes: 1 addition & 1 deletion mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
# Source tarball
######################################################################

PKG_TAR = dist/$(PKG_NAME).tar.gz
PKG_TAR = dist/$(PKG_NAME)-src.tar.gz

PKG_GITMODULES := $(S)src/llvm $(S)src/compiler-rt \
$(S)src/rt/hoedown $(S)src/jemalloc
Expand Down
18 changes: 14 additions & 4 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# The version number
CFG_RELEASE_NUM=0.13.0

# An optional number to put after the label, e.g. '2' -> '-beta2'
CFG_BETA_CYCLE=

CFG_FILENAME_EXTRA=4e7c5e5c

ifeq ($(CFG_RELEASE_CHANNEL),stable)
Expand All @@ -24,12 +27,13 @@ CFG_RELEASE=$(CFG_RELEASE_NUM)
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
endif
ifeq ($(CFG_RELEASE_CHANNEL),beta)
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta
# The beta channel is temporarily called 'alpha'
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
# When building beta/nightly distributables just reuse the same "beta"
# name so when we upload we'll always override the previous
# nighly. This doesn't actually impact the version reported by rustc -
# it's just for file naming.
CFG_PACKAGE_VERS=beta
CFG_PACKAGE_VERS=alpha
endif
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
Expand Down Expand Up @@ -325,6 +329,12 @@ export CFG_DISABLE_INJECT_STD_VERSION
# Per-stage targets and runner
######################################################################

# Valid setting-strings are 'all', 'none', 'gdb', 'lldb'
# This 'function' will determine which debugger scripts to copy based on a
# target triple. See debuggers.mk for more information.
TRIPLE_TO_DEBUGGER_SCRIPT_SETTING=\
$(if $(findstring windows,$(1)),none,$(if $(findstring darwin,$(1)),lldb,gdb))

STAGES = 0 1 2 3

define SREQ
Expand Down Expand Up @@ -357,7 +367,7 @@ else
HSREQ$(1)_H_$(3) = \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
$$(MKFILE_DEPS) \
tmp/install-debugger-scripts$(1)_H_$(3).done
tmp/install-debugger-scripts$(1)_H_$(3)-$$(call TRIPLE_TO_DEBUGGER_SCRIPT_SETTING,$(3)).done
endif

# Prerequisites for using the stageN compiler to build target artifacts
Expand All @@ -372,7 +382,7 @@ SREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(foreach dep,$$(TARGET_CRATES), \
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-$$(call TRIPLE_TO_DEBUGGER_SCRIPT_SETTING,$(2)).done

# Prerequisites for a working stageN compiler and complete set of target
# libraries
Expand Down
28 changes: 25 additions & 3 deletions mk/prepare.mk
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,27 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
endef

define INSTALL_GDB_DEBUGGER_SCRIPTS_COMMANDS
$(Q)$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $(PREPARE_DEST_BIN_DIR)
$(Q)$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $(PREPARE_DEST_LIB_DIR)/rustlib/etc
endef

define INSTALL_LLDB_DEBUGGER_SCRIPTS_COMMANDS
$(Q)$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $(PREPARE_DEST_BIN_DIR)
$(Q)$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $(PREPARE_DEST_LIB_DIR)/rustlib/etc
endef

define INSTALL_NO_DEBUGGER_SCRIPTS_COMMANDS
$(Q)echo "No debugger scripts will be installed for host $(PREPARE_HOST)"
endef

# $(1) is PREPARE_HOST
INSTALL_DEBUGGER_SCRIPT_COMMANDS=$(if $(findstring windows,$(1)),\
$(INSTALL_NO_DEBUGGER_SCRIPTS_COMMANDS),\
$(if $(findstring darwin,$(1)),\
$(INSTALL_LLDB_DEBUGGER_SCRIPTS_COMMANDS),\
$(INSTALL_GDB_DEBUGGER_SCRIPTS_COMMANDS)))

define DEF_PREPARE

prepare-base-$(1): PREPARE_SOURCE_DIR=$$(PREPARE_HOST)/stage$$(PREPARE_STAGE)
Expand All @@ -170,9 +191,10 @@ prepare-host-dirs-$(1): prepare-maybe-clean-$(1)
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR)/rustlib/etc)
$$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR))

prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) $(DEBUGGER_SCRIPTS_ALL)
$$(Q)$$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_ABS) $$(PREPARE_DEST_BIN_DIR)
$$(Q)$$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(PREPARE_DEST_LIB_DIR)/rustlib/etc
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) \
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) \
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS)
$$(call INSTALL_DEBUGGER_SCRIPT_COMMANDS,$$(PREPARE_HOST))

$$(foreach tool,$$(PREPARE_TOOLS), \
$$(foreach host,$$(CFG_HOST), \
Expand Down
43 changes: 7 additions & 36 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use std::io::process;
use std::io::timer;
use std::io;
use std::os;
use std::iter::repeat;
use std::str;
use std::string::String;
use std::thread::Thread;
Expand Down Expand Up @@ -367,7 +368,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
let DebuggerCommands {
commands,
check_lines,
use_gdb_pretty_printer,
breakpoint_lines
} = parse_debugger_commands(testfile, "gdb");
let mut cmds = commands.connect("\n");
Expand Down Expand Up @@ -521,16 +521,11 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
if header::gdb_version_to_int(version.as_slice()) >
header::gdb_version_to_int("7.4") {
// Add the directory containing the pretty printers to
// GDB's script auto loading safe path ...
// GDB's script auto loading safe path
script_str.push_str(
format!("add-auto-load-safe-path {}\n",
rust_pp_module_abs_path.replace("\\", "\\\\").as_slice())
.as_slice());
// ... and also the test directory
script_str.push_str(
format!("add-auto-load-safe-path {}\n",
config.build_base.as_str().unwrap().replace("\\", "\\\\"))
.as_slice());
}
}
_ => {
Expand All @@ -543,6 +538,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
// pretty printing, it just tells GDB to print values on one line:
script_str.push_str("set print pretty off\n");

// Add the pretty printer directory to GDB's source-file search path
script_str.push_str(format!("directory {}\n", rust_pp_module_abs_path)[]);

// Load the target executable
script_str.push_str(format!("file {}\n",
exe_file.as_str().unwrap().replace("\\", "\\\\"))
Expand All @@ -564,12 +562,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
script_str.as_slice(),
"debugger.script");

if use_gdb_pretty_printer {
// Only emit the gdb auto-loading script if pretty printers
// should actually be loaded
dump_gdb_autoload_script(config, testfile);
}

// run debugger script with gdb
#[cfg(windows)]
fn debugger() -> String {
Expand Down Expand Up @@ -611,19 +603,6 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
}

check_debugger_output(&debugger_run_result, check_lines.as_slice());

fn dump_gdb_autoload_script(config: &Config, testfile: &Path) {
let mut script_path = output_base_name(config, testfile);
let mut script_file_name = script_path.filename().unwrap().to_vec();
script_file_name.push_all("-gdb.py".as_bytes());
script_path.set_filename(script_file_name.as_slice());

let script_content = "import gdb_rust_pretty_printing\n\
gdb_rust_pretty_printing.register_printers(gdb.current_objfile())\n"
.as_bytes();

File::create(&script_path).write(script_content).unwrap();
}
}

fn find_rust_src_root(config: &Config) -> Option<Path> {
Expand Down Expand Up @@ -781,7 +760,6 @@ struct DebuggerCommands {
commands: Vec<String>,
check_lines: Vec<String>,
breakpoint_lines: Vec<uint>,
use_gdb_pretty_printer: bool
}

fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
Expand All @@ -794,7 +772,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
let mut breakpoint_lines = vec!();
let mut commands = vec!();
let mut check_lines = vec!();
let mut use_gdb_pretty_printer = false;
let mut counter = 1;
let mut reader = BufferedReader::new(File::open(file_path).unwrap());
for line in reader.lines() {
Expand All @@ -804,10 +781,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
breakpoint_lines.push(counter);
}

if line.as_slice().contains("gdb-use-pretty-printer") {
use_gdb_pretty_printer = true;
}

header::parse_name_value_directive(
line.as_slice(),
command_directive.as_slice()).map(|cmd| {
Expand All @@ -832,7 +805,6 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
commands: commands,
check_lines: check_lines,
breakpoint_lines: breakpoint_lines,
use_gdb_pretty_printer: use_gdb_pretty_printer,
}
}

Expand Down Expand Up @@ -976,8 +948,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
proc_res: &ProcRes) {

// true if we found the error in question
let mut found_flags = Vec::from_elem(
expected_errors.len(), false);
let mut found_flags: Vec<_> = repeat(false).take(expected_errors.len()).collect();

if proc_res.status.success() {
fatal("process did not return an error status");
Expand Down Expand Up @@ -1337,7 +1308,7 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path) ->
// Add the arguments in the run_flags directive
args.extend(split_maybe_args(&props.run_flags).into_iter());

let prog = args.remove(0).unwrap();
let prog = args.remove(0);
return ProcArgs {
prog: prog,
args: args,
Expand Down
Loading