[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda abandoned this revision. hintonda added a comment. Thanks for all your suggestions. Planning to rework and move the toolchain specific part to llvm/cmake/platform and abandon the cache part altogether. Repository: rC Clang https://reviews.llvm.org/D41660

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D41660#966023, @phosek wrote: > @hintonda I think this should be a platform file in > https://github.com/llvm-mirror/llvm/tree/master/cmake/platforms rather than > Clang cache file. Platform files are concerned with the host platform > (inc

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. @hintonda I think this should be a platform file in https://github.com/llvm-mirror/llvm/tree/master/cmake/platforms rather than Clang cache file. Platform files are concerned with the host platform (including cross-compilation), while cache files are related to the dis

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D41660#965935, @hintonda wrote: > In https://reviews.llvm.org/D41660#965877, @beanz wrote: > > > You should split the CMake cache file you created into two files, (1) a > > CMake Cache to manage the build configuration and (2) a tool chain fi

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D41660#965877, @beanz wrote: > You should split the CMake cache file you created into two files, (1) a CMake > Cache to manage the build configuration and (2) a tool chain file for > targeting Linux. As @semeenai pointed out we absolutly wan

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. You should split the CMake cache file you created into two files, (1) a CMake Cache to manage the build configuration and (2) a tool chain file for targeting Linux. As @semeenai pointed out we absolutly want the behavior of the toolchain file being loaded multiple times.

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In https://reviews.llvm.org/D41660#965686, @hintonda wrote: > In https://reviews.llvm.org/D41660#965656, @smeenai wrote: > > > > > > Cache files are preferred since they are only loaded once Isn't that precisely the behavior needed for cross-compilation though? You want

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 128409. hintonda added a comment. Use CMAKE_(C|CXX)_COMPILER_TARGET instead of CMAKE_(C|CXX)_COMPILER_ARG1, and pass all target variables via CLANG_BOOTSTRAP_CMAKE_ARGS. Add variable tests and Fix/update comments. Repository: rC Clang https://reviews.ll

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In https://reviews.llvm.org/D41660#965656, @smeenai wrote: > Why is this a cache file rather than a toolchain file (but passing itself as > a toolchain file to CMake under some circumstances?) Aren't toolchain files > traditionally used for cross-compilation? Thanks

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. Why is this a cache file rather than a toolchain file (but passing itself as a toolchain file to CMake under some circumstances?) Aren't toolchain files traditionally used for cross-compilation? Comment at: cmake/caches/linux-toolchain.cmake:20 +#

[PATCH] D41660: [cmake] Add new linux toolchain file

2018-01-02 Thread Don Hinton via Phabricator via cfe-commits
hintonda created this revision. hintonda added reviewers: compnerd, beanz, phosek. Herald added a subscriber: mgorny. Add new linux toolchain file that allows cross compiling to linux from other systems, e.g., Darwin. Also, add a new variable, ADDITIONAL_CLANG_BOOTSTRAP_DEPS, which allows adding