提交 a37ffb1b 编写于 作者: lymzzyh's avatar lymzzyh

[Tools]fix GCC7 in MacOSX

上级 a1eccf0e
import os
import re
import platform
def GetGCCRoot(rtconfig):
exec_path = rtconfig.EXEC_PATH
......@@ -59,7 +60,11 @@ def GCCResult(rtconfig, str):
f.close()
# '-fdirectives-only',
child = subprocess.Popen([gcc_cmd, '-E', '-P', '__tmp.c'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
if(platform.system() == 'Windows'):
child = subprocess.Popen([gcc_cmd, '-E', '-P', '__tmp.c'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
else:
child = subprocess.Popen(gcc_cmd + ' -E -P __tmp.c', stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = child.communicate()
print(stdout)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册