[cfe-commits] Use GCC_INSTALL_PREFIX to initialize SysRoot

Sebastian Pop spop at codeaurora.org
Sat Mar 10 21:08:53 PST 2012


Hi,

2012/3/10 Rafael Espíndola <rafael.espindola at gmail.com>:
> On the clang patch:
>
> Typo: Retunrs in
>
>  /// Retunrs the sysroot path after removing the trailing /.
>
>
> + #include "clang/Config/config.h"
>
> This should be with the other includes
>
> getSysRoot is returning a StringRef to a deleted object, no? Probably
> the best is to avoid using SmallString in Compilation::getSysRoot
> (which unfortunately means not using
> llvm::sys::path::remove_filename).
>
> The getSysRoot code is duplicated inline in Driver::BuildCompilation, no?

The code in the Driver happens before Compilation is created.
I took care of this duplication of code by initializing a field in Compilation
with the value that we computed in the Driver::SysRoot field.

>
> On the llvm patch:
>
> GCC_INSTALL_PREFIX and DEFAULT_SYSROOT can go in the clang CMakeFile,
> no? (thanks for adding GCC_INSTALL_PREFIX!).

Fixed: I moved both vars in the clang CMakeLists.txt

Thanks,
Sebastian
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-configure-flag-with-default-sysroot.patch
Type: text/x-diff
Size: 3395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120310/72360e25/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-use-DEFAULT_SYSROOT.patch
Type: text/x-diff
Size: 6806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120310/72360e25/attachment-0001.patch>


More information about the cfe-commits mailing list