[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-dev
Subject:    [LLVMdev] compiler-rt's append_if definition breaks lldb build
From:       Kuba Ober <kuba () mareimbrium ! org>
Date:       2014-03-14 23:02:33
Message-ID: 5103BA6B-0382-4FEF-B182-3DEE3B2AB9BA () mareimbrium ! org
[Download RAW message or body]

In cmake projects, it seems that the scope of macros/functions is global.
Whichever definition is seen last, wins.

The incompatible assign_if definition in cmake/Modules/CompilerRTUtils.cmake
breaks the lldb project, since it so happens that lldb=92s CMakeLists are p=
rocessed
after compiler_rt.

* In compiler-rt, it=92s expected that append_if operates on semicolon deli=
mited
  strings, also known as cmake lists.

* In core llvm, and in lldb, it=92s expected that append_if operates on spa=
ce-delmited strings.

I propose to rename those macros/functions to list_append_if etc. If this i=
s agreeable,
I=92ll prepare a patch.

I dislike the =93obvious=94 quick hack of moving the projects *after* tools=
 in the main
CMakeLists.txt.

I think it must be a matter of policy to treat the cmake function/macro nam=
espace as global
across the entire project. I=92m willing to write a script to check for thi=
s, so that people
reviewing patches could sanity-check without undue manual labor.

Cheers, Kuba Ober
_______________________________________________
LLVM Developers mailing list
LLVMdev@cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic