Add INTERMEDIATE platform kind; hide atari8-common wrappers#439
Add INTERMEDIATE platform kind; hide atari8-common wrappers#439cwedgwood wants to merge 1 commit into
Conversation
Intermediate platforms (atari8-common is the canonical case) exist only as shared layers consumed by descendants via @-included cfg fragments. Installing mos-<intermediate>-clang wrappers for them is misleading: there is no atari8-common machine, and a user invoking the wrapper gets a link that cannot run on real hardware. INTERMEDIATE suppresses just the wrapper install. Cfg generation, library install and parent-chain wiring are unchanged, so descendants (atari8-dos, atari8-cart-*, atari5200-*) keep working unchanged.
mysterymath
left a comment
There was a problem hiding this comment.
These are present as a feature to enhance portability, see: https://llvm-mos.org/wiki/Porting
These can be used along with other files in the user project to build against targets not yet directly supported by the SDK. At the most abstract, users can build against the common target to support arbitrary 6502 targets, but with some library support. Notably, it's important that this be possible without diving into CMake, particularly llvm-mos-sdk CMake, which is kinda intrinsically going to be difficult.
That being said, I am receptive to the idea that this may be confusing to users, and that they likely outnumber those that are trying to work on unusual hardware. Still, we shouldn't make the that task as difficult as this patch would; I'm open to other ideas on this.
|
Want me to just make this a docs update then? Or drop it entirely? |
|
If you can find a way to make it clearer in the docs yeah, but I'd also be open to having a way to gate these targets somehow... No idea what that would look like though. We could also maybe have a better naming convention for these... Maybe base rather than common? Something that implies incompleteness... But yeah, this is not gonna fly as is. |
What
Adds an
INTERMEDIATEoption to theplatform()function incmake/platform.cmake. When set, the platform's library/cfg are still built and installed, but themos-<name>-clang/clang++/clang-cppdriver wrappers are not.Applies it to
atari8-common.Why
atari8-commonexists only as a shared layer thatatari8-dos,atari8-cart-std,atari8-cart-megacartand theatari5200-*carts chain through via@mos-atari8-common.cfg. There is no "atari8-common" machine, so the installedmos-atari8-common-clang*wrappers are misleading: a user invoking one gets a successful link that cannot run on real hardware.Scope
Install-side only. No library content changes. The generated
mos-atari8-common.cfgis still installed so descendant@-includes resolve unchanged.Verification
/store0/opt/llvm-mos.mos-atari8-common-clang*absent;mos-atari8-common.cfgpresent.mos-atari8-dos-clang,mos-atari8-cart-std-clang, ...) present and produce valid.xex/.caroutput.test/atari8-dos(2/2) andtest/atari8-cart-std(7/7) pass.Follow-ups (not in this PR)
Other
HOSTED PARENTplatforms that look like analogous "shared layer" candidates and could plausibly becomeINTERMEDIATEin future PRs:pce-common,nes-common,commodore. Out of scope here.