[cfe-dev] (Feature request) Can Clang add an -output-folder option?

Csaba Raduly via cfe-dev cfe-dev at lists.llvm.org
Fri Aug 18 02:28:53 PDT 2017


On Thu, Aug 17, 2017 at 2:51 AM, Marcus Johnson via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> 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,

[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
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



More information about the cfe-dev mailing list