Ian Zerny | 0e3714c | 2019-02-12 13:21:56 +0100 | [diff] [blame] | 1 | # 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 | |
| 5 | import os |
| 6 | import 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 | |
| 11 | TOOLS_DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..'))) |
| 12 | REPO_ROOT = os.path.realpath(os.path.join(TOOLS_DIR, '..')) |
| 13 | THIRD_PARTY = os.path.join(REPO_ROOT, 'third_party') |
| 14 | |
| 15 | def IsWindows(): |
| 16 | return sys.platform.startswith('win') |
| 17 | |
| 18 | def IsLinux(): |
| 19 | return sys.platform.startswith('linux') |
| 20 | |
| 21 | def IsOsX(): |
| 22 | return sys.platform.startswith('darwin') |