"Unknown warning" error when trying to compile libcxx tests for remote, bare-metal target

Hi there,

I'm trying to set up the libcxx tests to run on a remote, bare-metal target and am running into some issues with an unknown warning error:

error: unknown warning option '-Wno-aligned-allocation-unavailable'; did you mean '-Wno-debug-compression-unavailable'? [-Werror,-Wunknown-warning-option]

It seems this flag should only get added to the compile options if it is supported through line 673 in config.py:


So I'm wondering why I still get the error message then, if it is apparently supported?

I have created <Target>RemoteTI in target_info.py and call llvm-lit with the following command line parameters from the libcxx root folder:

-sv --param target_triple=<triple> --param compile_flags="<some additional flags>" ./test

My custom target info is also defining some target specific compile flags.

Some very shallow, initial digging around leads me to suspect the -nostdinc flag that I'm setting in my target info. I need this flag since our internal backend does not set any default include paths yet and without it, clang tries to include my host system headers, which then leads to an include error. However I am unsure if the preprocessor triggers this error before clang checks for unknown warning options, therefore hiding the actual problem.

While I could circumvent the error by setting --param enable_warnings=false I would prefer to not use this workaround and instead fix the actual problem.

Is there something that I'm missing here or is this a bug in the regression test suite?



CC’ing llvm-dev for more visibility. Original message below.