Skip to content

Commit

Permalink
Merge pull request #2444 from lf-lang/patmos-fix
Browse files Browse the repository at this point in the history
Patmos: better compiler flags
  • Loading branch information
erlingrj authored Dec 7, 2024
2 parents 800679b + 2f01d09 commit b0dc6c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/c-embedded.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
# uses: ./.github/workflows/c-flexpret-tests.yml

# Run the C Patmos integration tests.
patmos:
uses: ./.github/workflows/c-patmos-tests.yml
# patmos:
# uses: ./.github/workflows/c-patmos-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,14 @@ 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
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/c/reactor-c

0 comments on commit b0dc6c9

Please sign in to comment.