Skip to content

linux tulpe报错修复,llvm-arm编译器报错 #10353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tools/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def GenerateCFiles(env, project, project_name):
tool_path_conv["CMAKE_ASM_COMPILER"] = tool_path_conv_helper(rtconfig.AS)
tool_path_conv["CMAKE_AR"] = tool_path_conv_helper(rtconfig.AR)
tool_path_conv["CMAKE_LINKER"] = tool_path_conv_helper(rtconfig.LINK)
if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['gcc','llvm-arm']:
tool_path_conv["CMAKE_SIZE"] = tool_path_conv_helper(rtconfig.SIZE)
tool_path_conv["CMAKE_OBJDUMP"] = tool_path_conv_helper(rtconfig.OBJDUMP)
tool_path_conv["CMAKE_OBJCOPY"] = tool_path_conv_helper(rtconfig.OBJCPY)
Expand Down Expand Up @@ -99,7 +99,7 @@ def GenerateCFiles(env, project, project_name):
AS += ".exe"
AR += ".exe"
LINK += ".exe"
if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['gcc','llvm-arm']:
SIZE += ".exe"
OBJDUMP += ".exe"
OBJCOPY += ".exe"
Expand Down Expand Up @@ -129,15 +129,15 @@ def GenerateCFiles(env, project, project_name):
cm_file.write("SET(CMAKE_CXX_FLAGS \""+ CXXFLAGS + "\")\n")
cm_file.write("SET(CMAKE_CXX_COMPILER_WORKS TRUE)\n\n")

if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['gcc','llvm-arm']:
cm_file.write("SET(CMAKE_OBJCOPY \""+ OBJCOPY + "\")\n")
cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n")
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
cm_file.write("SET(CMAKE_FROMELF \""+ FROMELF + "\")\n\n")

LINKER_FLAGS = ''
LINKER_LIBS = ''
if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['gcc','llvm-arm']:
LINKER_FLAGS += '-T'
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
LINKER_FLAGS += '--scatter'
Expand Down Expand Up @@ -186,7 +186,7 @@ def GenerateCFiles(env, project, project_name):

cm_file.write("ADD_DEFINITIONS(\n")
for i in env['CPPDEFINES']:
cm_file.write("\t-D" + i + "\n")
cm_file.write("\t-D" + str(i).replace("(", "").replace(")", "").replace(",", " ") + "\n")
cm_file.write(")\n\n")

libgroups = []
Expand Down Expand Up @@ -290,7 +290,7 @@ def GenerateCFiles(env, project, project_name):
cm_file.write("\n")

cm_file.write("# Interface library search paths\n")
if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['gcc','llvm-arm']:
for group in libgroups:
if not 'LIBPATH' in group.keys():
continue
Expand Down