From d74f1cfb3025410fc1271a1df1a9a21707a7a3d7 Mon Sep 17 00:00:00 2001 From: Roland McGrath <mcgrathr@google.com> Date: Sat, 6 Apr 2019 00:19:01 -0700 Subject: [PATCH] [build] Remove //zircon/public/config Nothing uses the Zircon board lists via GN or .../zircon-boards.list any more. Bug: BLD-437 #comment Removed //zircon/public/config Change-Id: Ic9f59756aa95cb43699f1ba926f674620eb34ff1 --- BUILD.gn | 2 -- build/zircon/boards.mako | 14 ----------- build/zircon/create_gn_rules.py | 18 -------------- build/zircon/list_boards.py | 25 ------------------- build/zircon/main.mako | 29 ----------------------- zircon/.gitignore | 1 - zircon/BUILD.gn | 11 --------- zircon/system/dev/board/gauss/BUILD.gn | 6 ----- zircon/system/dev/board/hikey960/BUILD.gn | 6 ----- zircon/system/dev/board/qemu/BUILD.gn | 6 ----- zircon/system/dev/board/vim/BUILD.gn | 6 ----- zircon/system/dev/board/x86/BUILD.gn | 6 ----- 12 files changed, 130 deletions(-) delete mode 100644 build/zircon/boards.mako delete mode 100755 build/zircon/list_boards.py delete mode 100644 build/zircon/main.mako diff --git a/BUILD.gn b/BUILD.gn index 9ee35619578..e48605fac27 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -38,10 +38,8 @@ zircon_files = exec_script("//build/zircon/list_source_files.py", [], "list lines") supporting_templates = [ - "//build/zircon/boards.mako", "//build/zircon/header.mako", "//build/zircon/host_tool.mako", - "//build/zircon/main.mako", "//build/zircon/shared_library.mako", "//build/zircon/source_library.mako", "//build/zircon/static_library.mako", diff --git a/build/zircon/boards.mako b/build/zircon/boards.mako deleted file mode 100644 index ebc97ec7fc6..00000000000 --- a/build/zircon/boards.mako +++ /dev/null @@ -1,14 +0,0 @@ -<%include file="header.mako" /> - -% for arch, boards in sorted(data.iteritems()): -${'else ' if not loop.first else ''}if (target_cpu == "${arch}") { - zircon_boards = [ - % for board in boards: - "${board}", - % endfor - ] -} -% endfor -else { - assert(false, "Unsupported architecture: $target_cpu.") -} diff --git a/build/zircon/create_gn_rules.py b/build/zircon/create_gn_rules.py index 8fcea27e691..74def0533d8 100755 --- a/build/zircon/create_gn_rules.py +++ b/build/zircon/create_gn_rules.py @@ -457,14 +457,6 @@ def generate_banjo_library(package, context): generate_build_file(build_path, 'banjo.mako', data, context) -def generate_board_list(package, context): - '''Generates a configuration file with the list of target boards.''' - build_path = os.path.join(context.out_dir, 'config', 'boards.gni') - generate_build_file(build_path, 'boards.mako', package, context) - build_path = os.path.join(context.out_dir, 'config', 'BUILD.gn') - generate_build_file(build_path, 'main.mako', package, context) - - class GenerationContext(object): '''Describes the context in which GN rules should be generated.''' @@ -492,7 +484,6 @@ def main(): args = parser.parse_args() out_dir = os.path.abspath(args.out) - shutil.rmtree(os.path.join(out_dir, 'config'), True) shutil.rmtree(os.path.join(out_dir, 'fidl'), True) shutil.rmtree(os.path.join(out_dir, 'banjo'), True) shutil.rmtree(os.path.join(out_dir, 'lib'), True) @@ -551,15 +542,6 @@ def main(): if debug: print('Processed %s (%s)' % (name, type)) - board_file_lines = [] - for cpu in ['arm64', 'x64']: - board_path = os.path.join(args.zircon_build, 'export', - 'boards-%s.list' % cpu) - with open(board_path, 'r') as board_file: - board_file_lines += [ '[%s]' % cpu ] + board_file.readlines() - package = parse_package(board_file_lines) - generate_board_list(package, context) - if __name__ == '__main__': sys.exit(main()) diff --git a/build/zircon/list_boards.py b/build/zircon/list_boards.py deleted file mode 100755 index 3bed6c1977e..00000000000 --- a/build/zircon/list_boards.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# Copyright 2018 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. - -import argparse -import sys - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('--out', - help='Path to the output file', - required=True) - parser.add_argument('--boards', - help='Name of the supported boards', - nargs='*') - args = parser.parse_args() - - with open(args.out, 'w') as out_file: - out_file.write('\n'.join(args.boards)) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/build/zircon/main.mako b/build/zircon/main.mako deleted file mode 100644 index db53589e27c..00000000000 --- a/build/zircon/main.mako +++ /dev/null @@ -1,29 +0,0 @@ -<%include file="header.mako" /> - -action("boards") { - script = "//build/zircon/list_boards.py" - - board_file = "$root_out_dir/zircon-boards.list" - - outputs = [ - board_file, - ] - - args = [ - "--out", - rebase_path(board_file), - "--boards", - ] - % for arch, boards in sorted(data.iteritems()): - ${'else ' if not loop.first else ''}if (target_cpu == "${arch}") { - args += [ - % for board in boards: - "${board}", - % endfor - ] - } - % endfor - else { - assert(false, "Unsupported architecture: $target_cpu.") - } -} diff --git a/zircon/.gitignore b/zircon/.gitignore index f7db35fcac5..753de22de78 100644 --- a/zircon/.gitignore +++ b/zircon/.gitignore @@ -30,7 +30,6 @@ json_generator_tests_*.txt /prebuilt/config.mk.bak /AnalysisResult/ /public/banjo/ -/public/config/ /public/fidl/ /public/lib/ /public/sysroot/ diff --git a/zircon/BUILD.gn b/zircon/BUILD.gn index 7529e96ce41..00c2fcc3562 100644 --- a/zircon/BUILD.gn +++ b/zircon/BUILD.gn @@ -185,17 +185,6 @@ if (current_toolchain == default_toolchain) { ] } - generated_file("boards-$cpu.list") { - testonly = true - outputs = [ - "$root_build_dir/export/$target_name", - ] - data_keys = [ "legacy_pkg_boards" ] - deps = [ - ":$cpu", - ] - } - # This lists just the one file to link against to get fdio. build_api_module("legacy-fdio-$cpu") { data_keys = [ "link_output" ] diff --git a/zircon/system/dev/board/gauss/BUILD.gn b/zircon/system/dev/board/gauss/BUILD.gn index bd32863e780..e5a5bee3844 100644 --- a/zircon/system/dev/board/gauss/BUILD.gn +++ b/zircon/system/dev/board/gauss/BUILD.gn @@ -29,12 +29,6 @@ driver("gauss") { data_deps = [ ":gauss-i2c-test", ] - - # TODO(BLD-353): Temporary hacks for integrating with the legacy Fuchsia - # GN build. - metadata = { - legacy_pkg_boards = [ target_name ] - } } driver("gauss-i2c-test") { diff --git a/zircon/system/dev/board/hikey960/BUILD.gn b/zircon/system/dev/board/hikey960/BUILD.gn index c8d03511c4d..993f701352c 100644 --- a/zircon/system/dev/board/hikey960/BUILD.gn +++ b/zircon/system/dev/board/hikey960/BUILD.gn @@ -30,12 +30,6 @@ driver("hikey960") { "$zx/kernel/target/arm64/boot-shim:hikey960", ":hi3660-i2c-test", # TODO: only for test configs ] - - # TODO(BLD-353): Temporary hacks for integrating with the legacy Fuchsia - # GN build. - metadata = { - legacy_pkg_boards = [ target_name ] - } } driver("hi3660-i2c-test") { diff --git a/zircon/system/dev/board/qemu/BUILD.gn b/zircon/system/dev/board/qemu/BUILD.gn index c3b0b304066..eae72c86977 100644 --- a/zircon/system/dev/board/qemu/BUILD.gn +++ b/zircon/system/dev/board/qemu/BUILD.gn @@ -17,11 +17,5 @@ driver("qemu") { data_deps = [ "$zx/kernel/target/arm64/boot-shim:qemu", ] - - # TODO(BLD-353): Temporary hacks for integrating with the legacy Fuchsia - # GN build. - metadata = { - legacy_pkg_boards = [ target_name ] - } } } diff --git a/zircon/system/dev/board/vim/BUILD.gn b/zircon/system/dev/board/vim/BUILD.gn index adb2a7afa44..f06e09d0cba 100644 --- a/zircon/system/dev/board/vim/BUILD.gn +++ b/zircon/system/dev/board/vim/BUILD.gn @@ -43,10 +43,4 @@ driver("vim") { "$zx/system/ulib/zx", "$zx/system/ulib/zxcpp", ] - - # TODO(BLD-353): Temporary hacks for integrating with the legacy Fuchsia - # GN build. - metadata = { - legacy_pkg_boards = [ "vim2" ] - } } diff --git a/zircon/system/dev/board/x86/BUILD.gn b/zircon/system/dev/board/x86/BUILD.gn index a4edb545699..3174d099a3f 100644 --- a/zircon/system/dev/board/x86/BUILD.gn +++ b/zircon/system/dev/board/x86/BUILD.gn @@ -82,10 +82,4 @@ driver("platform-bus-x86") { "$zx/third_party/lib/acpica", "$zx/third_party/ulib/chromiumos-platform-ec", ] - - # TODO(BLD-353): Temporary hacks for integrating with the legacy Fuchsia - # GN build. - metadata = { - legacy_pkg_boards = [ "pc" ] - } } -- GitLab