blob: 8f2cecc1a0890fcb5723c6c064a24e52ec0fd999 [file] [log] [blame]
Ian Zerny0e3714c2019-02-12 13:21:56 +01001# Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
3# BSD-style license that can be found in the LICENSE file.
4
5import os
6import sys
7
8# Static defines for use in tools (and utils.py).
9# There must be no dependencies on other utils from this file!
10
11TOOLS_DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..')))
12REPO_ROOT = os.path.realpath(os.path.join(TOOLS_DIR, '..'))
13THIRD_PARTY = os.path.join(REPO_ROOT, 'third_party')
14
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020015
Ian Zerny0e3714c2019-02-12 13:21:56 +010016def IsWindows():
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020017 return sys.platform.startswith('win')
18
Ian Zerny0e3714c2019-02-12 13:21:56 +010019
20def IsLinux():
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020021 return sys.platform.startswith('linux')
22
Ian Zerny0e3714c2019-02-12 13:21:56 +010023
24def IsOsX():
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020025 return sys.platform.startswith('darwin')