diff options
| author | guozhanxin <[email protected]> | 2023-11-14 18:18:07 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2023-11-14 09:45:05 -0500 |
| commit | 0b1a49ed6615f5e47b1848a26b2f8733bfeb8334 (patch) | |
| tree | 1150db9bfbecdd6350847c128c5260c494962fce | |
| parent | 7a56058c612ba86e1d0403490029b916efe87b87 (diff) | |
[tools/gcc.py]fix scons error.
| -rw-r--r-- | tools/gcc.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gcc.py b/tools/gcc.py index 356842a8e8..52aaaf1488 100644 --- a/tools/gcc.py +++ b/tools/gcc.py @@ -74,6 +74,10 @@ def GetGccDefaultSearchDirs(rtconfig): device_flags = rtconfig.DEVICE.split() args = [gcc_cmd] + device_flags + ['-xc', '-E', '-v', os.devnull] + # if gcc_cmd can not access , return empty list + if not os.access(gcc_cmd, os.X_OK): + return [] + proc = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) lines = proc.stdout.splitlines() |
