Commit 28572ad0 authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[mac] Enable support for JSCVT in builtins.

When cross-compiling builtins, hardcode the fact that targeting MACOSX
enables JSCVT. This is useful when cross-compiling from a x86 Mac where
the compiler itself does not define __ARM_FEATURE_JSCVT for the
mksnapshot binary.

Change-Id: I2817f18de42b18f6236e5d5f26d574a0955a7557
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2637228
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72319}
parent 02f17a8c
......@@ -44,7 +44,7 @@ namespace internal {
namespace {
#ifdef USE_SIMULATOR
static unsigned SimulatorFeaturesFromCommandLine() {
unsigned SimulatorFeaturesFromCommandLine() {
if (strcmp(FLAG_sim_arm64_optional_features, "none") == 0) {
return 0;
}
......@@ -62,7 +62,7 @@ static unsigned SimulatorFeaturesFromCommandLine() {
}
#endif // USE_SIMULATOR
static constexpr unsigned CpuFeaturesFromCompiler() {
constexpr unsigned CpuFeaturesFromCompiler() {
unsigned features = 0;
#if defined(__ARM_FEATURE_JCVT)
features |= 1u << JSCVT;
......@@ -70,6 +70,14 @@ static constexpr unsigned CpuFeaturesFromCompiler() {
return features;
}
constexpr unsigned CpuFeaturesFromTargetOS() {
unsigned features = 0;
#if defined(V8_TARGET_OS_MACOSX)
features |= 1u << JSCVT;
#endif
return features;
}
} // namespace
// -----------------------------------------------------------------------------
......@@ -79,6 +87,7 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
// Only use statically determined features for cross compile (snapshot).
if (cross_compile) {
supported_ |= CpuFeaturesFromCompiler();
supported_ |= CpuFeaturesFromTargetOS();
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment