mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
ccfafee023
This makes doing an SDK build in the Fuchsia tree easier. The previous attempt at this change failed in gyp builds targeting xcode. They failed because input lists for actions of the same target (e.g. the actions for dartanalyzer) are merged and de-duped when the lists contain relative paths, but merged and *not* de-duped when the lists contain absolute paths. gyp rejects xcode files that it generated itself when they contain duplicate entries. This CL works around that bug, by using absolute paths in the GN build and keeping relative paths in the gyp build. R=rmacnak@google.com Review-Url: https://codereview.chromium.org/2567213002 .
27 lines
927 B
Text
27 lines
927 B
Text
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
_dart_root = rebase_path("..")
|
|
|
|
template("create_timestamp_file") {
|
|
assert(defined(invoker.path), "Must specify 'path'")
|
|
assert(defined(invoker.output), "Must specify 'output'")
|
|
path = invoker.path
|
|
output = invoker.output
|
|
action(target_name) {
|
|
list_args = [ path ]
|
|
if (defined(invoker.pattern)) {
|
|
list_args += [ invoker.pattern ]
|
|
}
|
|
files = exec_script("$_dart_root/tools/list_dart_files.py",
|
|
[ "absolute" ] + list_args,
|
|
"list lines")
|
|
inputs = [ "$_dart_root/tools/list_dart_files.py" ] + files
|
|
outputs = [
|
|
output,
|
|
]
|
|
script = "$_dart_root/tools/create_timestamp_file.py"
|
|
args = [ rebase_path(output) ]
|
|
}
|
|
}
|