Skip to content

Commit

Permalink
servo: Merge #6306 - Use Cargo's target directory sharing (from metaj…
Browse files Browse the repository at this point in the history
…ack:shared-target-dir); r=mbrubeck

This speeds up `./mach build --dev` followed by `./mach build-cef` by
25%. When rust-lang/cargo#497 is fixed, this speedup will increase
dramatically.

Source-Repo: https://github.com/servo/servo
Source-Revision: d6263c9b6e969fde4c644034e684a39d68667ad9

UltraBlame original commit: 42376672d55b8b2f7f08473d1ab24888896d0256
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 2050d41 commit 18aad63
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 155 deletions.
4 changes: 2 additions & 2 deletions servo/cargo-nightly-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
2015
-
04
06
-
14
15
12 changes: 0 additions & 12 deletions servo/components/servo/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ linker
.
.
/
support
/
android
-
rs
-
glue
/
apk
-
builder
/
target
/
debug
Expand Down
36 changes: 0 additions & 36 deletions servo/components/util/resource_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,41 +201,6 @@ pop
;
path
.
pop
(
)
;
path
.
push
(
"
resources
"
)
;
if
!
path
.
is_dir
(
)
{
path
.
pop
(
)
;
path
.
pop
(
)
;
path
.
push
(
"
Expand Down Expand Up @@ -274,7 +239,6 @@ resources
;
}
}
}
path
}
}
Expand Down
8 changes: 0 additions & 8 deletions servo/etc/ci/upload_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ servo
org
/
*
components
/
servo
/
target
/
doc
Expand All @@ -106,10 +102,6 @@ ghp
import
-
n
components
/
servo
/
target
/
doc
Expand Down
14 changes: 7 additions & 7 deletions servo/ports/cef/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ libc
"
*
"
objc
=
"
0
.
1
"
[
dependencies
.
Expand Down Expand Up @@ -450,6 +443,13 @@ darwin
.
dependencies
]
objc
=
"
0
.
1
"
cocoa
=
"
Expand Down
8 changes: 0 additions & 8 deletions servo/ports/gonk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,6 @@ libmozjs
.
so
(
ports
/
gonk
/
target
/
arm
Expand Down Expand Up @@ -438,10 +434,6 @@ Copy
b2s
adb
push
ports
/
gonk
/
target
/
arm
Expand Down
13 changes: 2 additions & 11 deletions servo/python/servo/build_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,19 +923,10 @@

base_path
=
path
self
.
join
get_target_dir
(
"
components
"
"
servo
"
"
target
"
)

release_path
Expand Down
88 changes: 77 additions & 11 deletions servo/python/servo/command_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,30 +1118,66 @@
_cargo_build_id

def
get_binary_path
get_target_dir
(
self
release
dev
)
:

base_path
=
path
.
join
(
if
"
components
CARGO_TARGET_DIR
"
in
os
.
environ
:

return
os
.
environ
[
"
servo
CARGO_TARGET_DIR
"
]

else
:

return
path
.
join
(
self
.
context
.
topdir
"
target
"
)

def
get_binary_path
(
self
release
dev
)
:

base_path
=
self
.
get_target_dir
(
)

release_path
=
Expand Down Expand Up @@ -1792,6 +1828,36 @@
"
]

if
"
CARGO_TARGET_DIR
"
not
in
env
:

env
[
"
CARGO_TARGET_DIR
"
]
=
path
.
join
(
self
.
context
.
topdir
"
target
"
)

if
extra_lib
:
Expand Down
21 changes: 4 additions & 17 deletions servo/python/servo/post_build_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,21 +994,11 @@
.
join
(

self
.
context
.
topdir
"
components
"
"
servo
"
"
target
"
get_target_dir
(
)
"
doc
"
Expand Down Expand Up @@ -1263,13 +1253,10 @@

self
.
servo_crate
get_target_dir
(
)
"
target
"
"
doc
"
"
Expand Down
31 changes: 6 additions & 25 deletions servo/python/servo/testing_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,9 @@

self
.
context
.
topdir
"
components
"
"
servo
"
"
target
"
get_target_dir
(
)
"
debug
"
Expand Down Expand Up @@ -260,19 +251,9 @@

self
.
context
.
topdir
"
components
"
"
servo
"

"
target
"
get_target_dir
(
)
"
debug
"
Expand Down
14 changes: 0 additions & 14 deletions servo/python/tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,6 @@
"

"
components
/
servo
/
target
/
*
"

"
ports
/
gonk
/
target
/
*
Expand Down
Loading

0 comments on commit 18aad63

Please sign in to comment.