| # Copyright 2020 The Fuchsia Authors |
| # |
| # Use of this source code is governed by a MIT-style |
| # license that can be found in the LICENSE file or at |
| # https://opensource.org/licenses/MIT |
| |
| import("//build/toolchain/variant.gni") |
| |
| # This has to be variant() rather than config() to be used in the toolchain |
| # configs list. |
| variant("strict-align") { |
| cflags = [ "-mstrict-align" ] |
| } |
| |
| source_set("address-space") { |
| sources = [ "address-space.cc" ] |
| include_dirs = [ "//." ] |
| deps = [ |
| "//zircon/kernel/lib/arch", |
| "//zircon/kernel/phys:arch-header", |
| "//zircon/kernel/phys/lib/memalloc", |
| "//zircon/system/ulib/zbitl", |
| ] |
| } |
| |
| source_set("phys") { |
| sources = [ |
| "setup.cc", |
| "start.S", |
| ] |
| include_dirs = [ "//zircon/.." ] |
| deps = [ |
| "//zircon/kernel/lib/arch", |
| "//zircon/kernel/phys:arch-header", |
| "//zircon/system/ulib/static-pie", |
| ] |
| } |
| |
| config("zbi_executable.config") { |
| # ZBI executables can be loaded anywhere, so they are linked at 0. |
| ldflags = [ "-Wl,-defsym,PHYS_LOAD_ADDRESS=0" ] |
| } |
| |
| config("qemu.config") { |
| # Direct QEMU phys executables are the same. |
| configs = [ ":zbi_executable.config" ] |
| } |