Skip to content

Commit 20e7cc0

Browse files
committed
---
yaml --- r: 83847 b: refs/heads/try c: 6ad1d0f h: refs/heads/master i: 83845: fb96a66 83843: e4cf733 83839: 548a4d2 v: v3
1 parent 8ff1d88 commit 20e7cc0

File tree

14 files changed

+302
-548
lines changed

14 files changed

+302
-548
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: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: 8854b78b555d9a03a3b2ff248230696ec94e24c0
5+
refs/heads/try: 6ad1d0f861b02589ede7e06f1221bbe790ef31a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/rustpkg.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ and builds it in any workspace(s) where it finds one.
137137
Supposing such packages are found in workspaces X, Y, and Z,
138138
the command leaves behind files in `X`'s, `Y`'s, and `Z`'s `build` directories,
139139
but not in their `lib` or `bin` directories.
140-
(The exception is when rustpkg fetches a package `foo`'s sources from a remote repository.
141-
In that case, it stores both the sources *and* the build artifacts for `foo`
142-
in the workspace that `foo` will install to (see ##install below)).
143140

144141
## clean
145142

@@ -151,11 +148,7 @@ in the workspace that `foo` will install to (see ##install below)).
151148
If `RUST_PATH` is declared as an environment variable, then rustpkg installs the
152149
libraries and executables into the `lib` and `bin` subdirectories
153150
of the first entry in `RUST_PATH`.
154-
Otherwise, if the current working directory CWD is a workspace,
155-
it installs them into CWD's `lib` and `bin` subdirectories.
156-
Otherwise, if the current working directory is CWD,
157-
it installs them into the .rust/lib and .rust/bin subdirectories of CWD
158-
(creating them if necessary).
151+
Otherwise, it installs them into `foo`'s `lib` and `bin` directories.
159152

160153
## test
161154

branches/try/doc/tutorial-ffi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ the true length after compression for setting the length.
135135
~~~~ {.xfail-test}
136136
pub fn compress(src: &[u8]) -> ~[u8] {
137137
#[fixed_stack_segment]; #[inline(never)];
138-
138+
139139
unsafe {
140140
let srclen = src.len() as size_t;
141141
let psrc = vec::raw::to_ptr(src);
@@ -157,7 +157,7 @@ format and `snappy_uncompressed_length` will retrieve the exact buffer size requ
157157
~~~~ {.xfail-test}
158158
pub fn uncompress(src: &[u8]) -> Option<~[u8]> {
159159
#[fixed_stack_segment]; #[inline(never)];
160-
160+
161161
unsafe {
162162
let srclen = src.len() as size_t;
163163
let psrc = vec::raw::to_ptr(src);
@@ -236,7 +236,7 @@ use std::libc::size_t;
236236
unsafe fn snappy_max_compressed_length(source_length: size_t) -> size_t {
237237
#[fixed_stack_segment]; #[inline(never)];
238238
return snappy_max_compressed_length(source_length);
239-
239+
240240
#[link_args = "-lsnappy"]
241241
extern {
242242
fn snappy_max_compressed_length(source_length: size_t) -> size_t;
@@ -259,9 +259,9 @@ check that one of the following conditions holds:
259259
2. The call occurs inside of an `extern fn`;
260260
3. The call occurs within a stack closure created by some other
261261
safe fn.
262-
262+
263263
All of these conditions ensure that you are running on a large stack
264-
segmented. However, they are sometimes too strict. If your application
264+
segment. However, they are sometimes too strict. If your application
265265
will be making many calls into C, it is often beneficial to promote
266266
the `#[fixed_stack_segment]` attribute higher up the call chain. For
267267
example, the Rust compiler actually labels main itself as requiring a
@@ -298,7 +298,7 @@ impl<T: Send> Unique<T> {
298298
pub fn new(value: T) -> Unique<T> {
299299
#[fixed_stack_segment];
300300
#[inline(never)];
301-
301+
302302
unsafe {
303303
let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
304304
assert!(!ptr::is_null(ptr));
@@ -324,7 +324,7 @@ impl<T: Send> Drop for Unique<T> {
324324
fn drop(&mut self) {
325325
#[fixed_stack_segment];
326326
#[inline(never)];
327-
327+
328328
unsafe {
329329
let x = intrinsics::init(); // dummy value to swap in
330330
// moving the object out is needed to call the destructor

branches/try/src/librustpkg/api.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ use target::*;
1616
use version::Version;
1717
use workcache_support::*;
1818

19-
pub use source_control::{safe_git_clone, git_clone_url};
20-
2119
use std::os;
2220
use extra::arc::{Arc,RWArc};
2321
use extra::workcache;
@@ -70,27 +68,23 @@ pub fn build_lib(sysroot: Path, root: Path, name: ~str, version: Version,
7068
lib: Path) {
7169
let cx = default_context(sysroot);
7270
let pkg_src = PkgSrc {
73-
source_workspace: root.clone(),
74-
build_in_destination: false,
75-
destination_workspace: root.clone(),
76-
start_dir: root.push("src").push(name),
77-
id: PkgId{ version: version, ..PkgId::new(name)},
78-
// n.b. This assumes the package only has one crate
79-
libs: ~[mk_crate(lib)],
80-
mains: ~[],
81-
tests: ~[],
82-
benchs: ~[]
83-
};
71+
workspace: root.clone(),
72+
start_dir: root.push("src").push(name),
73+
id: PkgId{ version: version, ..PkgId::new(name)},
74+
// n.b. This assumes the package only has one crate
75+
libs: ~[mk_crate(lib)],
76+
mains: ~[],
77+
tests: ~[],
78+
benchs: ~[]
79+
};
8480
pkg_src.build(&cx, ~[]);
8581
}
8682

8783
pub fn build_exe(sysroot: Path, root: Path, name: ~str, version: Version,
8884
main: Path) {
8985
let cx = default_context(sysroot);
9086
let pkg_src = PkgSrc {
91-
source_workspace: root.clone(),
92-
build_in_destination: false,
93-
destination_workspace: root.clone(),
87+
workspace: root.clone(),
9488
start_dir: root.push("src").push(name),
9589
id: PkgId{ version: version, ..PkgId::new(name)},
9690
libs: ~[],
@@ -106,7 +100,7 @@ pub fn build_exe(sysroot: Path, root: Path, name: ~str, version: Version,
106100
pub fn install_pkg(sysroot: Path, workspace: Path, name: ~str, version: Version) {
107101
let cx = default_context(sysroot);
108102
let pkgid = PkgId{ version: version, ..PkgId::new(name)};
109-
cx.install(PkgSrc::new(workspace.clone(), workspace, false, pkgid), &Everything);
103+
cx.install(PkgSrc::new(workspace, false, pkgid), &Everything);
110104
}
111105

112106
fn mk_crate(p: Path) -> Crate {

branches/try/src/librustpkg/conditions.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,3 @@ condition! {
5050
condition! {
5151
pub failed_to_create_temp_dir: (~str) -> Path;
5252
}
53-
54-
condition! {
55-
pub git_checkout_failed: (~str, Path) -> ();
56-
}

branches/try/src/librustpkg/package_id.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ impl PkgId {
102102
}
103103

104104
pub fn prefixes_iter(&self) -> Prefixes {
105-
prefixes_iter(&self.path)
105+
Prefixes {
106+
components: self.path.components().to_owned(),
107+
remaining: ~[]
108+
}
106109
}
107110

108111
// This is the workcache function name for the *installed*
@@ -113,13 +116,6 @@ impl PkgId {
113116
}
114117
}
115118

116-
pub fn prefixes_iter(p: &Path) -> Prefixes {
117-
Prefixes {
118-
components: p.components().to_owned(),
119-
remaining: ~[]
120-
}
121-
}
122-
123119
struct Prefixes {
124120
priv components: ~[~str],
125121
priv remaining: ~[~str]

0 commit comments

Comments
 (0)