Skip to content

Commit

Permalink
servo: Merge #10916 - Use NEON build flag on ARM and AArch64 (from mm…
Browse files Browse the repository at this point in the history
…atyas:useneon); r=aneeshusa

The NEON flag is already used when building for Android, this patch enables it on other ARM devices too.

Note that this patch just adds the build flag to the compilation, for actually enabling the SIMD code in Servo, we'll also need #10900 (but it's not a dependency).

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

UltraBlame original commit: ed43c96e2aa45b5353169af6812740e8609c83ab
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 2c90f92 commit bc7b949
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 82 deletions.
124 changes: 73 additions & 51 deletions servo/python/servo/build_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,28 +1308,38 @@
1
)

targets
=
[
]

if
release
target
and
android
:

opts
+
=
[
print
(
"
Please
specify
either
-
-
release
target
or
-
-
android
.
"
]
)

sys
.
exit
(
1
)

if
target
release
:

opts
Expand All @@ -1339,17 +1349,9 @@
"
-
-
target
release
"
target
]

targets
.
append
(
target
)

if
jobs
Expand Down Expand Up @@ -1387,15 +1389,8 @@
android
:

opts
+
=
[
"
-
-
target
"
=
self
.
config
Expand All @@ -1409,28 +1404,30 @@
target
"
]
]

if
target
:

targets
.
append
(
opts
+
=
[
"
arm
-
linux
-
androideabi
target
"
)
target
]

self
.
ensure_bootstrapped
(
targets
target
=
targets
target
)

if
Expand Down Expand Up @@ -1518,19 +1515,42 @@
(
)

if
android
:

#
Ensure
Rust
uses
hard
floats
and
SIMD
on
Android
ARM
devices

if
target
:

if
target
.
startswith
(
'
arm
'
)
or
target
.
startswith
(
'
aarch64
'
)
:

env
[
'
Expand Down Expand Up @@ -1559,6 +1579,10 @@
+
neon
"

if
android
:

#
Build
Expand Down Expand Up @@ -2643,25 +2667,23 @@
)
:

targets
target
=
[
"
arm
-
linux
-
androideabi
"
]

self
.
ensure_bootstrapped
(
targets
target
=
targets
target
)

opts
Expand Down
60 changes: 29 additions & 31 deletions servo/python/servo/command_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4377,10 +4377,9 @@
ensure_bootstrapped
(
self
targets
target
=
[
]
None
)
:

Expand Down Expand Up @@ -4461,43 +4460,39 @@
"
)

target_paths
target_exists
=
True

if
target
is
not
None
:

target_path
=
[
path
.
join
(
base_target_path
t
target
)
for
t
in
targets
]

all_targets_exist

target_exists
=
all
(
[
path
.
exists
(
p
)
for
p
in
target_paths
]
target_path
)

if
(
not
(
self
.
config
Expand All @@ -4513,14 +4508,11 @@
rust
'
]
and

or
(
not
rustc_binary_exists
or
not
all_targets_exist
and
target_exists
)
)
:
Expand Down Expand Up @@ -4557,7 +4549,13 @@
context
target
=
targets
filter
(
None
[
target
]
)
)

cargo_path
Expand Down

0 comments on commit bc7b949

Please sign in to comment.