language-c icon indicating copy to clipboard operation
language-c copied to clipboard

Support putting arbitrary command line options first

Open flip111 opened this issue 1 year ago • 0 comments

At the moment this library issues commands like this (verified with strace)

» /usr/bin/gcc -o /tmp/c2hsc499725-608499725-610.i -E /tmp/c2hsc499725-608.src
gcc: warning: /tmp/c2hsc499725-608.src: linker input file unused because linking not done

To get rid of this warning one solution is to write this

/usr/bin/gcc -x c -o /tmp/c2hsc499725-608499725-610.i -E /tmp/c2hsc499725-608.src

At the moment this is not possible due to a limited set of options that are accepted to go first https://github.com/visq/language-c/blob/master/src/Language/C/System/GCC.hs#L104

flip111 avatar Mar 09 '24 00:03 flip111