Skip to content

Commit

Permalink
Patmos: better compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
schoeberl committed Dec 6, 2024
1 parent 800679b commit 9758873
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,15 @@ CodeBuilder generateCMakeCode(
break;
case PATMOS:
cMakeCode.newLine();
cMakeCode.pr("SET(CMAKE_SYSTEM_NAME patmos)");
cMakeCode.pr("SET(CMAKE_SYSTEM_PROCESSOR patmos)");
cMakeCode.pr("# Include toolchain file and set project");
cMakeCode.pr(
"find_program(CLANG_EXECUTABLE NAMES patmos-clang REQUIRED DOC \"Path to the clang"
+ " front-end.\")");
cMakeCode.pr("set(CMAKE_C_FLAGS_INIT \"-O2 -DNDEBUG\")");


cMakeCode.pr("set(CMAKE_C_COMPILER ${CLANG_EXECUTABLE})");
cMakeCode.pr(
"set(CMAKE_C_FLAGS_RELEASE \"-O2 -DNDEBUG\")"); // patmos-clang cannot compiler -O3
Expand Down

0 comments on commit 9758873

Please sign in to comment.