Skip to content

Commit

Permalink
Configure compiler with available zero page.
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed Jul 19, 2022
1 parent 430a6d1 commit 119c275
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmake/platform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ function(platform name)
return()
endif()

if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang.cfg)
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/clang.cfg CONFIG)
endif()

# Add Clang configuration file.
set(clang_config ${CMAKE_CURRENT_BINARY_DIR}/mos-${PLATFORM}.cfg)
if(PARENT)
Expand Down
1 change: 1 addition & 0 deletions mos-platform/atari8/clang.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-mlto-zp=206
1 change: 1 addition & 0 deletions mos-platform/commodore/clang.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-mlto-zp=110
4 changes: 3 additions & 1 deletion mos-platform/derived.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
-isystem <CFGDIR>/../mos-platform/${PLATFORM}/include
-L<CFGDIR>/../mos-platform/${PLATFORM}/lib

# Include target-specific flags.
${CONFIG}

# Include parent configuration afterwards to give it lesser precedence.
@mos-${PARENT}.cfg

1 change: 1 addition & 0 deletions mos-platform/dodo/clang.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-mlto-zp=182
1 change: 1 addition & 0 deletions mos-platform/nes/clang.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-mlto-zp=224
1 change: 1 addition & 0 deletions mos-platform/osi-c1p/clang.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-mlto-zp=222
3 changes: 3 additions & 0 deletions mos-platform/root.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
# Place directories in include and linker search paths.
-isystem <CFGDIR>/../mos-platform/${PLATFORM}/include
-L<CFGDIR>/../mos-platform/${PLATFORM}/lib

# Include target-specific flags.
${CONFIG}
1 change: 1 addition & 0 deletions mos-platform/sim/clang.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-mlto-zp=224

0 comments on commit 119c275

Please sign in to comment.