-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
standard-complianceCompliance with ISO, POSIX, etc.Compliance with ISO, POSIX, etc.
Description
@willcro needs to be able to use ableC as a drop-in replacement for $CC, and in general it'd be nice if people could do this, at least for the flags that autotools, cmake, meson, etc. require to function. I suspect this isn't much more than what's in POSIX in terms of argument parsing.
The existing argument parsing is kind of terrible; we can't even handle ableC.sh -o main main.c at the moment! It looks like this might've gotten started as edu:umn:cs:melt:ableC:drivers:compile; but this looks to be a copy of parseAndPrint with an extra comment at the top at the moment?
I think the plan forward looks something like:
- Parse the arguments specified in POSIX for c99, plus
-x(and--, which isn't specified here but we ought to support) - For any specified file with a
.xcextension not specified after a-xflag, or specified after-x xc, parseAndPrint it to a temporary.cfile - Invoke
${ABLEC_BACKEND_CC:-clang}with the remainder of the arguments, with the.cfiles substituted for the.xcfiles, and-x csubstituted for-x xc.
@krame505, any chance this is something you'd have time for in the next week or so? I'm pretty swamped at the moment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
standard-complianceCompliance with ISO, POSIX, etc.Compliance with ISO, POSIX, etc.