(Feature request) Can Clang add an -output-folder option?

that way we can specify where our output files go?

Not even CDing to my build folder before compiling in my makefile makes it work, and ofc the fact that makefiles can’t specify the -o option when compiling multiple files via $@

so yeah, there’s no way I know of to make it output to where I want.

AND USING CMAKE ISN’T AN OPTION

so yeah, there's no way I know of to make it output to where I want.

Sounds like you're asking for Clang to fix your deficient build
system. That's unlikely to happen even if you submitted a patch to do
it. A feature request on cfe-dev has approximately 0% chance of
working.

AND USING CMAKE ISN'T AN OPTION

It probably is, and the allcaps make me even less likely to believe
you have good reasons for that statement.

Cheers.

Tim.

[citation needed]

What commands did you (or your build system) run? What was the output?

In fact, this works just fine for me:

$ cd /tmp
$ touch foo.c bar.c baz.c
$ mkdir b
$ cd b
$ clang -c -Wall -pedantic -Wextra ../foo.c ../bar.c ../baz.c
../foo.c:1:1: warning: ISO C requires a translation unit to contain at
least one declaration [-Wempty-translation-unit]
1 warning generated.
../bar.c:1:1: warning: ISO C requires a translation unit to contain at
least one declaration [-Wempty-translation-unit]
1 warning generated.
../baz.c:1:1: warning: ISO C requires a translation unit to contain at
least one declaration [-Wempty-translation-unit]
1 warning generated.
$ ls -l *.o
-rw-rw-r-- 1 csabaraduly csabaraduly 600 Aug 18 11:27 bar.o
-rw-rw-r-- 1 csabaraduly csabaraduly 600 Aug 18 11:27 baz.o
-rw-rw-r-- 1 csabaraduly csabaraduly 600 Aug 18 11:27 foo.o

Csaba