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

Dominik Montada via libcxx-dev libcxx-dev at lists.llvm.org
Mon May 18 22:26:58 PDT 2020

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

Am 18.05.20 um 14:31 schrieb Dominik Montada via libcxx-dev:
> 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:
> self.cxx.addWarningFlagIfSupported('-Wno-aligned-allocation-unavailable')
> 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?
> Regards,
> Dominik
> _______________________________________________
> libcxx-dev mailing list
> libcxx-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20200519/626b4e42/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20200519/626b4e42/attachment.bin>

More information about the libcxx-dev mailing list