[Lldb-commits] [PATCH] Make CMake choose the test exe target architecture according to the build.
Greg Clayton
gclayton at apple.com
Wed Jul 30 18:36:15 PDT 2014
Anything make based can be ok'ed by Tood Fiala and Ed Maste. If they are good, I am good.
> On Jul 30, 2014, at 4:40 PM, Zachary Turner <zturner at google.com> wrote:
>
> ================
> Comment at: CMakeLists.txt:22-26
> @@ -21,1 +21,7 @@
>
> +# Determine the native architecture.
> +string(TOLOWER "${LLVM_TARGET_ARCH}" LLDB_TARGET_ARCH)
> +if( LLDB_TARGET_ARCH STREQUAL "host" )
> + string(REGEX MATCH "^[^-]*" LLDB_TARGET_ARCH ${LLVM_HOST_TRIPLE})
> +endif ()
> +
> ----------------
> Chandler Carruth wrote:
>> So, this isn't the "native" architecture. For an LLVM cross compiler, it will not execute on the local machine at all. It's just the target architecture.
>>
>> I don't think you want to have an 'LLDB_TARGET_ARCH' variable. That doesn't really make sense, especially in the singular.
>>
>> I think you should just set this in the test-specific cmake, and I think you should make it 'LLDB_TEST_TRIPLE' which is cached, user-overridable, and defaults to 'LLVM_DEFAULT_TARGET_TRIPLE'.
> LLDB doesn't support cross-compilation anyway, so I think it's safe to assume that the host and target are the same.
>
> All we're trying to figure out, ultimately, is whether to pass -m32 or -m64 to clang. So allowing the user to specify a full triple seems like overkill and is likely to be confusing, it seems more straightforward if they just pass in "x86" or "x64".
>
> http://reviews.llvm.org/D4730
>
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list