Skip to content

Commit 119c275

Browse files
committed
Configure compiler with available zero page.
1 parent 430a6d1 commit 119c275

File tree

9 files changed

+16
-1
lines changed

9 files changed

+16
-1
lines changed

cmake/platform.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ function(platform name)
6868
return()
6969
endif()
7070

71+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang.cfg)
72+
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/clang.cfg CONFIG)
73+
endif()
74+
7175
# Add Clang configuration file.
7276
set(clang_config ${CMAKE_CURRENT_BINARY_DIR}/mos-${PLATFORM}.cfg)
7377
if(PARENT)

mos-platform/atari8/clang.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-mlto-zp=206

mos-platform/commodore/clang.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-mlto-zp=110

mos-platform/derived.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
-isystem <CFGDIR>/../mos-platform/${PLATFORM}/include
55
-L<CFGDIR>/../mos-platform/${PLATFORM}/lib
66

7+
# Include target-specific flags.
8+
${CONFIG}
9+
710
# Include parent configuration afterwards to give it lesser precedence.
811
@mos-${PARENT}.cfg
9-

mos-platform/dodo/clang.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-mlto-zp=182

mos-platform/nes/clang.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-mlto-zp=224

mos-platform/osi-c1p/clang.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-mlto-zp=222

mos-platform/root.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
# Place directories in include and linker search paths.
1212
-isystem <CFGDIR>/../mos-platform/${PLATFORM}/include
1313
-L<CFGDIR>/../mos-platform/${PLATFORM}/lib
14+
15+
# Include target-specific flags.
16+
${CONFIG}

mos-platform/sim/clang.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-mlto-zp=224

0 commit comments

Comments
 (0)