Hywan / inline-c-rs

Write and execute C code inside Rust.
BSD 3-Clause "New" or "Revised" License
149 stars 19 forks source link

fix: On some Linux, `cc` expects the input argument to come before other options #4

Closed Hywan closed 3 years ago

Hywan commented 4 years ago

For instance, the following will fail:

cc -I<…> -L<…> -Wl,l<…> -o test test.c

But the following will work:

cc test.c -I<…> -L<…> -Wl,l<…> -o test

This patch puts the input path first, before everything.