Skip to content

Commit

Permalink
[tools/gcc.py]fix scons error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Guozhanxin committed Nov 14, 2023
1 parent 6d7e393 commit e29a407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e29a407

Please sign in to comment.