44 linhas
1.1 KiB
Plaintext
44 linhas
1.1 KiB
Plaintext
# Copyright 2016 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
|
|
|
|
# Generate a linker script by replacing all variables with provided values.
|
|
#
|
|
# Parameters
|
|
#
|
|
# output (required)
|
|
# Input file name
|
|
#
|
|
# input (required)
|
|
# Output file name
|
|
#
|
|
# defines (required)
|
|
# List of defines used for substitution
|
|
template("generate_ld_script") {
|
|
assert(defined(invoker.input), "must specify \"input\" value")
|
|
assert(defined(invoker.output), "must specify \"output\" value")
|
|
assert(defined(invoker.defines), "must specify \"defines\" value")
|
|
forward_variables_from(invoker,
|
|
[
|
|
"input",
|
|
"output",
|
|
"defines",
|
|
])
|
|
action(target_name) {
|
|
script = "//gnbuild/generate_ld_script.sh"
|
|
sources = [
|
|
input,
|
|
]
|
|
outputs = [
|
|
output,
|
|
]
|
|
|
|
args = [
|
|
rebase_path(input),
|
|
rebase_path(output),
|
|
] + defines
|
|
}
|
|
}
|