blob: 965f4dadfb60a2acbe5618c391e4b9a5b2e5410e [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Platform baseline.
# This tracks the minimum hardware requirements for Fuchsia on x86-64.
config("x64") {
cflags = [
"-march=x86-64-v2",
"-mtune=generic",
]
# TODO(fxbug.dev/87237): the below is for Skylake through Cascade Lake.
# Not all x86-64 builds need this.
# Remove from baseline and apply via `board_configs` argument as needed.
configs = [ ":mitigate_skylake_jcc" ]
}
# Mitigate Jump Conditional Code erratum.
# See: fxbug.dev/44204
config("mitigate_skylake_jcc") {
if (is_gcc) {
cflags = [ "-Wa,-mbranches-within-32B-boundaries" ]
} else {
cflags = [ "-mbranches-within-32B-boundaries" ]
}
}
# Optimize for Intel Haswell
config("haswell") {
cflags = [ "-mcpu=haswell" ]
rustflags = [ "-Ctarget-cpu=haswell" ]
}