Open arunptm opened 1 year ago
The best person to add support is you. I am quite positive that none of us use that compiler. It shouldn't be very hard to add support for it.
Hi, Thanks for hint. I started to add Tasking compiler support but missing some documentation means which all .py files to update. e.g linker rule need to update as below
# Rule for linking C executable.
rule C_EXECUTABLE_LINKER__ASILC_OBD_Stub_Release
command = cmd.exe /C "$PRE_LINK && C:\Tasking\bin\cctc.exe $FLAGS $LINK_FLAGS -f $RSP_FILE -o $TARGET_FILE && $POST_BUILD"
description = Linking C executable $TARGET_FILE
rspfile = $RSP_FILE
rspfile_content = $in_newline $LINK_PATH $LINK_LIBRARIES
restat = $RESTAT
What is $PRE_LINK here? Other than that I think this should work fine with the existing compiler model, and doesn't require editing the ninja backend.
$PRE_LINK can be ignored, following way linking rule should be generated, before linking rsp file should be generated. I have found the py code location to update the linking rule but not able to update the format as given below
rule c_LINKER command = "cctc" $ARGS $LINK_ARGS -f $RSP_FILE -o $out description = Linking target $out rspfile = $RSP_FILE rspfile_content = $in_newline $LINK_PATH $LINK_LIBRARIES restat = $RESTAT
I have added new compiler py file also and adapted static & dynamic rule accordingly.
I have implemented support for TASKING compilers on this branch: https://github.com/gerioldman/meson/tree/TaskingCCompiler but I would like to add support for the MIL linking feature of the compiler family before I create a PR. The reason I am asking before trying to implement it is because this mode of the compiler doesn't exactly conform to the "normal" compilation process. What I mean by that is, that instead of the normal:
it is like this:
Basically, the fronted of the compiler transpiles the C language into some proprietary intermediate language (*.mil files) first, then these files MIL files get "linked" together, and is given to the backend of the compiler where it is compiled to a single object file. The reason this is done, is to get application wide optimizations instead of file scope optimizations, pretty akin to unity builds. You can find more information here on page 210: https://www.tasking.com/support/tricore/ctc_user_guide_v6.3r1.pdf
As far as I can see, there is no way to implement this without changing the Ninja backend implementation, and I don't want to do work on something that won't be accepted. Could you give me guidance as how this could be implemented that would actually get accepted?
Might want to also raise awareness in the Matrix/IRC channel. I'm sure there might be some opinions there.
Please add Tasking embedded software compiler support to Meson build syste. CPU name is Tricore.
Otherwise unknown compiler error appears
Log:
cmd stdout: