[compiler-rt] r276256 - Attempt to fix clang-cmake-mips after r268977.

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 11:15:01 PDT 2016



> On Jul 22, 2016, at 12:11 PM, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:
> 
> > What I think is happening is that the 'include(builtin-config-ix)' in lib/builtins/CMakeLists.txt includes the
> > 'set(TEST_COMPILE_ONLY On)' from cmake/builtin-config-ix.cmake which later causes
> > CAN_TARGET_mips64 to be set according to the compiler behaviour rather than the compiler+linker
> > behaviour. I can compile mips64 objects successfully on this machine but I can't link them.
>  
> This isn't what's happening but because 'set(TEST_COMPILE_ONLY On)' executes slightly after the CAN_TARGET_mips64 check.
>  
> It seems the truth of the matter is that r275780 on Monday fixed gcc builds by changing –mabi=n64 to –mabi=64. This didn't take effect until Wednesday because buildbot is configured to skip the cmake command if build.ninja exists. On Wednesday, we repaired the disk which eventually caused buildbot to wipe the build area and run the cmake command, introducing the failures. At this point, I couldn't find anything obvious in the blamelists for Wednesday so I looked into it and found the unconditional 'set(TEST_COMPILE_ONLY On)' which led me to r276256.
>  
> To summarize, I think the unconditional 'set(TEST_COMPILE_ONLY On)' is probably a bug that would have a similar effect to our buildbot failure but it wasn't the cause of it. Sorry for the noise.

This is actually intentional. It shouldn't impact the non-darwin build because the tests on the non-Apple branch are under if(COMPILER_RT_BUILTINS_STANDALONE_BUILD). In the Apple build, this allows the builtins build to include architectures that aren't included in the sanitizer build.

-Chris


>  
> From: Daniel Sanders 
> Sent: 22 July 2016 14:33
> To: 'Chris Bieneman'
> Cc: llvm-commits at lists.llvm.org; Vasileios Kalintiris
> Subject: RE: [compiler-rt] r276256 - Attempt to fix clang-cmake-mips after r268977.
>  
> > I'm OOO until Monday, and don't have hardware to reproduce. Can you reproduce it locally? If so can we try and sync up next week to debug better? I'd really like to understand why you're getting false success.
>  
> No problem. The buildbot just turned green after the latest workaround attempt so I'm no longer rushing as much as I was. I'll try to reproduce it outside of the buildbot so I can debug this more easily.
>  
> What I think is happening is that the 'include(builtin-config-ix)' in lib/builtins/CMakeLists.txt includes the 'set(TEST_COMPILE_ONLY On)' from cmake/builtin-config-ix.cmake which later causes CAN_TARGET_mips64 to be set according to the compiler behaviour rather than the compiler+linker behaviour. I can compile mips64 objects successfully on this machine but I can't link them.
>  
> From: cbieneman at apple.com [mailto:cbieneman at apple.com] On Behalf Of Chris Bieneman
> Sent: 22 July 2016 14:19
> To: Daniel Sanders
> Cc: llvm-commits at lists.llvm.org; Vasileios Kalintiris
> Subject: Re: [compiler-rt] r276256 - Attempt to fix clang-cmake-mips after r268977.
>  
> r268977 shouldn't impact your build at all without changing your builder configuration. The change is to allow lib/builtins/CMakelists.txt to be treated as a top-level CMake project for the builtin libraries. If you don't use the builtins directory as the root of the CMake invocation it should have no impact on the build.
>  
> I'm OOO until Monday, and don't have hardware to reproduce. Can you reproduce it locally? If so can we try and sync up next week to debug better? I'd really like to understand why you're getting false success.
>  
> Thanks,
> -Chris
> 
> On Jul 22, 2016, at 8:46 AM, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:
> 
> This attempt at fixing it didn't work so I've already reverted it and manually
> set CAN_TARGET_mips64=FALSE instead. This should get us back to the
> position we were in before the reboot but it will only last until the next time
> it fully reconfigures.
> 
> This workaround didn't work either because cmake re-calculates it on each invocation but I've fixed that in r276402.
> 
> 
> -----Original Message-----
> From: Daniel Sanders
> Sent: 21 July 2016 11:06
> To: Daniel Sanders; llvm-commits at lists.llvm.org; Chris Bieneman
> (beanz at apple.com); Vasileios Kalintiris
> Subject: RE: [compiler-rt] r276256 - Attempt to fix clang-cmake-mips after
> r268977.
>  
> Hi Chris,
>  
> Vasileios and I rebooted one of our buildslaves yesterday to fix some disk
> errors and when we brought it back up we found that compiler-rt is failing
> some mips64 tests. However, these tests weren't enabled before. I think it
> has wiped out the build area and fully-reconfigured and this has caused it to
> notice the changes in r268977 and set CAN_TARGET_mips64=TRUE. It used to
> be false because it's the linker cannot find the multilibs (they're not
> installed).
>  
> This attempt at fixing it didn't work so I've already reverted it and manually
> set CAN_TARGET_mips64=FALSE instead. This should get us back to the
> position we were in before the reboot but it will only last until the next time
> it fully reconfigures.
>  
> Do you have any suggestions for fixing this properly?
>  
> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On
> Behalf
> Of Daniel Sanders via llvm-commits
> Sent: 21 July 2016 10:28
> To: llvm-commits at lists.llvm.org
> Subject: [compiler-rt] r276256 - Attempt to fix clang-cmake-mips after
> r268977.
>  
> Author: dsanders
> Date: Thu Jul 21 04:28:09 2016
> New Revision: 276256
>  
> URL: http://llvm.org/viewvc/llvm-project?rev=276256&view=rev
> Log:
> Attempt to fix clang-cmake-mips after r268977.
>  
> I think it's wiped out the build area and fully-reconfigured for the first time
> since r268977. This seems to have caused Mips64 to become enabled when
> it
> wasn't
> before because compiling with -mabi=64 succeeds but linking with -
> mabi=64
> fails.
>  
>  
> Modified:
>    compiler-rt/trunk/cmake/builtin-config-ix.cmake
>  
> Modified: compiler-rt/trunk/cmake/builtin-config-ix.cmake
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/builtin-
> config-ix.cmake?rev=276256&r1=276255&r2=276256&view=diff
>  
> ==========================================================
> ====================
> --- compiler-rt/trunk/cmake/builtin-config-ix.cmake (original)
> +++ compiler-rt/trunk/cmake/builtin-config-ix.cmake Thu Jul 21 04:28:09
> 2016
> @@ -2,6 +2,12 @@ include(BuiltinTests)
>  
> # Make all the tests only check the compiler
> set(TEST_COMPILE_ONLY On)
> +# Temporary fix for Mips buildbots this broke. It's the linker that rejects
> +# inappropriate multilibs on this system.
> +check_compile_definition("__mips__" "" IS_MIPS_HOST)
> +if(IS_MIPS_HOST)
> +  set(TEST_COMPILE_ONLY OFF)
> +endif()
>  
> builtin_check_c_compiler_flag(-fPIC
> COMPILER_RT_HAS_FPIC_FLAG)
> builtin_check_c_compiler_flag(-fPIE
> COMPILER_RT_HAS_FPIE_FLAG)
>  
>  
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160722/2eb8d5a5/attachment.html>


More information about the llvm-commits mailing list