gn2bp: remove gn desc invocation from gen_android_bp
This did not work out of the box and is not needed right now. Can always
add it back in the future.
Test: call the script
Change-Id: I465f3afc64c65520d730da25da6afeb23e2763f8
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 438d0f2..5e0e192 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -36,15 +36,6 @@
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-# Arguments for the GN output directory.
-gn_args = ' '.join([
- 'is_debug=false',
- 'is_perfetto_build_generator=true',
- 'perfetto_build_with_android=true',
- 'target_cpu="arm"',
- 'target_os="android"',
-])
-
# Default targets to translate to the blueprint file.
default_targets = [
'//:libperfetto_client_experimental',
@@ -1036,7 +1027,8 @@
description='Generate Android.bp from a GN description.')
parser.add_argument(
'--desc',
- help='GN description (e.g., gn desc out --format=json --all-toolchains "//*"'
+ help='GN description (e.g., gn desc out --format=json --all-toolchains "//*"',
+ required=True
)
parser.add_argument(
'--extras',
@@ -1054,11 +1046,8 @@
help='Targets to include in the blueprint (e.g., "//:perfetto_tests")')
args = parser.parse_args()
- if args.desc:
- with open(args.desc) as f:
- desc = json.load(f)
- else:
- desc = gn_utils.create_build_description(gn_args)
+ with open(args.desc) as f:
+ desc = json.load(f)
gn = gn_utils.GnParser(desc)
blueprint = create_blueprint_for_targets(gn, desc, args.targets or