diff options
-rw-r--r-- | cargo-nightly-build | 2 | ||||
-rw-r--r-- | components/servo/.cargo/config | 2 | ||||
-rw-r--r-- | components/util/resource_files.rs | 15 | ||||
-rwxr-xr-x | etc/ci/upload_docs.sh | 4 | ||||
-rw-r--r-- | ports/cef/Cargo.toml | 2 | ||||
-rw-r--r-- | ports/gonk/README.md | 4 | ||||
-rw-r--r-- | python/servo/build_commands.py | 2 | ||||
-rw-r--r-- | python/servo/command_base.py | 11 | ||||
-rw-r--r-- | python/servo/post_build_commands.py | 5 | ||||
-rw-r--r-- | python/servo/testing_commands.py | 5 | ||||
-rw-r--r-- | python/tidy.py | 3 | ||||
-rwxr-xr-x | tests/power/PowerMeasure.py | 2 | ||||
-rw-r--r-- | tests/wpt/harness/test/test.cfg.example | 2 | ||||
-rw-r--r-- | tests/wpt/run.py | 2 |
14 files changed, 31 insertions, 30 deletions
diff --git a/cargo-nightly-build b/cargo-nightly-build index 6e6ac373f0d..75510412ea2 100644 --- a/cargo-nightly-build +++ b/cargo-nightly-build @@ -1 +1 @@ -2015-04-14 +2015-06-15 diff --git a/components/servo/.cargo/config b/components/servo/.cargo/config index 642462bb6d3..fbeabb1346a 100644 --- a/components/servo/.cargo/config +++ b/components/servo/.cargo/config @@ -1,5 +1,5 @@ paths = ["../../support/android-rs-glue"] [target.arm-linux-androideabi] -linker = "../../support/android-rs-glue/apk-builder/target/debug/apk-builder" +linker = "../../target/debug/apk-builder" ar = "arm-linux-androideabi-ar" diff --git a/components/util/resource_files.rs b/components/util/resource_files.rs index f9e89df4af1..41a09511078 100644 --- a/components/util/resource_files.rs +++ b/components/util/resource_files.rs @@ -21,26 +21,22 @@ pub fn resources_dir_path() -> PathBuf { Some(ref path) => PathBuf::from(path), None => { // FIXME: Find a way to not rely on the executable being - // under `<servo source>/components/servo/target` - // or `<servo source>/components/servo/target/release`. + // under `<servo source>[/$target_triple]/target/debug` + // or `<servo source>[/$target_triple]/target/release`. let mut path = env::current_exe().ok().expect("can't get exe path"); path.pop(); path.push("resources"); if !path.is_dir() { // resources dir not in same dir as exe? - path.pop(); + // exe is probably in target/{debug,release} so we need to go back to topdir path.pop(); path.pop(); path.pop(); path.push("resources"); - if !path.is_dir() { // self_exe_path() is probably in .../target/release + if !path.is_dir() { + // exe is probably in target/$target_triple/{debug,release} so go back one more path.pop(); path.pop(); path.push("resources"); - if !path.is_dir() { // self_exe_path() is probably in .../target/release - path.pop(); - path.pop(); - path.push("resources"); - } } } path @@ -48,7 +44,6 @@ pub fn resources_dir_path() -> PathBuf { } } - pub fn read_resource_file(relative_path_components: &[&str]) -> io::Result<Vec<u8>> { let mut path = resources_dir_path(); for component in relative_path_components { diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index 2a9a48062f3..240b20d7762 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -10,7 +10,7 @@ cd "$(dirname $0)/../.." ./mach doc # etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html -cp etc/doc.servo.org/* components/servo/target/doc/ +cp etc/doc.servo.org/* target/doc/ -ghp-import -n components/servo/target/doc +ghp-import -n target/doc git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml index 301e10f77b5..ed90af25084 100644 --- a/ports/cef/Cargo.toml +++ b/ports/cef/Cargo.toml @@ -12,7 +12,6 @@ crate-type = ["dylib"] log = "*" url = "*" libc = "*" -objc = "0.1" [dependencies.servo] path = "../../components/servo" @@ -72,6 +71,7 @@ git = "https://github.com/servo/rust-stb-image" git = "https://github.com/servo/gleam" [target.x86_64-apple-darwin.dependencies] +objc = "0.1" cocoa = "*" core-foundation = "*" core-graphics = "*" diff --git a/ports/gonk/README.md b/ports/gonk/README.md index fbdfb3e8ef7..0309b036983 100644 --- a/ports/gonk/README.md +++ b/ports/gonk/README.md @@ -51,7 +51,7 @@ Run `./mach build-gonk` from the root directory ## Copy the files to the Flame -To reduce the size of libmozjs.so (`ports/gonk/target/arm-linux-androideabi/build/mozjs-sys-*/out/libmozjs.so`), +To reduce the size of libmozjs.so (`target/arm-linux-androideabi/build/mozjs-sys-*/out/libmozjs.so`), you can run `strip` on it. Use the one in your toolchain (`$ANDROID_TOOLCHAIN/bin/arm-linux-androideabi-strip libmozjs.so`). Make sure the device is on, connected to wifi, with high or no screen timeout. @@ -64,7 +64,7 @@ adb remount adb push /path/to/stripped/mozjs.so system/lib # Copy b2s -adb push ports/gonk/target/arm-linux-androideabi system/bin +adb push target/arm-linux-androideabi system/bin # Copy resources adb shell mkdir sdcard/servo diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 6167431ac61..6fd44653603 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -147,7 +147,7 @@ class MachCommands(CommandBase): opts = params or [] features = [] - base_path = path.join("components", "servo", "target") + base_path = self.get_target_dir() release_path = path.join(base_path, "release", "servo") dev_path = path.join(base_path, "debug", "servo") diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 5369b3e47f9..c6d46fc3de8 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -130,8 +130,14 @@ class CommandBase(object): self._cargo_build_id = open(filename).read().strip() return self._cargo_build_id + def get_target_dir(self): + if "CARGO_TARGET_DIR" in os.environ: + return os.environ["CARGO_TARGET_DIR"] + else: + return path.join(self.context.topdir, "target") + def get_binary_path(self, release, dev): - base_path = path.join("components", "servo", "target") + base_path = self.get_target_dir() release_path = path.join(base_path, "release", "servo") dev_path = path.join(base_path, "debug", "servo") @@ -199,6 +205,9 @@ class CommandBase(object): if "CARGO_HOME" not in env: env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"] + if "CARGO_TARGET_DIR" not in env: + env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target") + if extra_lib: if sys.platform == "darwin": env["DYLD_LIBRARY_PATH"] = "%s%s%s" % \ diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 927b425efe8..efa315158f8 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -137,8 +137,7 @@ class MachCommands(CommandBase): if not path.exists(path.join(self.config["tools"]["rust-root"], "doc")): Registrar.dispatch("bootstrap-rust-docs", context=self.context) rust_docs = path.join(self.config["tools"]["rust-root"], "doc") - docs = path.join( - self.context.topdir, "components", "servo", "target", "doc") + docs = path.join(self.get_target_dir(), "doc") if not path.exists(docs): os.makedirs(docs) @@ -167,4 +166,4 @@ class MachCommands(CommandBase): self.doc([]) import webbrowser webbrowser.open("file://" + path.abspath(path.join( - self.servo_crate(), "target", "doc", "servo", "index.html"))) + self.get_target_dir(), "doc", "servo", "index.html"))) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 5d656b2bc97..efe2b128653 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -47,12 +47,11 @@ class MachCommands(CommandBase): def find_test(self, prefix): target_contents = os.listdir(path.join( - self.context.topdir, "components", "servo", "target", "debug")) + self.get_target_dir(), "debug")) for filename in target_contents: if filename.startswith(prefix + "-"): filepath = path.join( - self.context.topdir, "components", "servo", - "target", "debug", filename) + self.get_target_dir(), "debug", filename) if path.isfile(filepath) and os.access(filepath, os.X_OK): return filepath diff --git a/python/tidy.py b/python/tidy.py index 6f4dc9778e8..75b372995e1 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -36,8 +36,7 @@ ignored_files = [ # Generated and upstream code combined with our own. Could use cleanup "components/script/dom/bindings/codegen/*", "components/style/properties/mod.rs", - "components/servo/target/*", - "ports/gonk/target/*", + "target/*", "ports/gonk/src/native_window_glue.cpp", "ports/cef/*", diff --git a/tests/power/PowerMeasure.py b/tests/power/PowerMeasure.py index 374ab597765..2eefb009763 100755 --- a/tests/power/PowerMeasure.py +++ b/tests/power/PowerMeasure.py @@ -44,7 +44,7 @@ def PowerCollector(OutputDir, Benchmarks, LayoutThreads, Renderer): power_dir, "power-Layout%d-set%d.csv" % (layoutT, ExpNum)) TimeFiles = path.join( time_dir, "time-Layout%d-set%d.csv" % (layoutT, ExpNum)) - ServoCmd = "(time ../../components/servo/target/release/servo -x -y %d %s %s) 2> %s" % \ + ServoCmd = "(time ../../target/release/servo -x -y %d %s %s) 2> %s" % \ (layoutT, Renderer, Benchmarks, TimeFiles) Metrics = path.join( etc_dir, "metrics-Layout%d-set%d-css.csv" % (layoutT, ExpNum)) diff --git a/tests/wpt/harness/test/test.cfg.example b/tests/wpt/harness/test/test.cfg.example index 6a4057e2200..373e53faaf6 100644 --- a/tests/wpt/harness/test/test.cfg.example +++ b/tests/wpt/harness/test/test.cfg.example @@ -8,7 +8,7 @@ ssl-type=none # prefs-root=/path/to/gecko-src/testing/profiles/ # [servo] -# binary=/path/to/servo-src/components/servo/target/servo +# binary=/path/to/servo-src/target/release/servo # exclude=testharness # Because it needs a special testharness.js # [chrome] diff --git a/tests/wpt/run.py b/tests/wpt/run.py index 897cbf990be..1e026fa606c 100644 --- a/tests/wpt/run.py +++ b/tests/wpt/run.py @@ -40,7 +40,7 @@ def set_defaults(paths, kwargs): if kwargs["binary"] is None: bin_dir = "release" if kwargs["release"] else "debug" - bin_path = servo_path("components", "servo", "target", bin_dir, "servo") + bin_path = servo_path("target", bin_dir, "servo") kwargs["binary"] = bin_path |