xref: /aosp_15_r20/external/angle/build/config/siso/platform.star (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# -*- bazel-starlark -*-
2*8975f5c5SAndroid Build Coastguard Worker# Copyright 2023 The Chromium Authors
3*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be
4*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file.
5*8975f5c5SAndroid Build Coastguard Worker"""Utilities that fill gap between platforms."""
6*8975f5c5SAndroid Build Coastguard Worker
7*8975f5c5SAndroid Build Coastguard Workerload("@builtin//runtime.star", "runtime")
8*8975f5c5SAndroid Build Coastguard Workerload("@builtin//struct.star", "module")
9*8975f5c5SAndroid Build Coastguard Worker
10*8975f5c5SAndroid Build Coastguard Worker# Python binary name. python3 or python3.exe.
11*8975f5c5SAndroid Build Coastguard Worker__python_bin = {
12*8975f5c5SAndroid Build Coastguard Worker    # is_windows => python bin
13*8975f5c5SAndroid Build Coastguard Worker    True: "python3.exe",
14*8975f5c5SAndroid Build Coastguard Worker    False: "python3",
15*8975f5c5SAndroid Build Coastguard Worker}[runtime.os == "windows"]
16*8975f5c5SAndroid Build Coastguard Worker
17*8975f5c5SAndroid Build Coastguard Workerplatform = module(
18*8975f5c5SAndroid Build Coastguard Worker    "platform",
19*8975f5c5SAndroid Build Coastguard Worker    python_bin = __python_bin,
20*8975f5c5SAndroid Build Coastguard Worker)
21