[llvm-commits] [PATCH] Rename LLVM_MULTITHREADED define and fix build without threads

Eric Christopher echristo at apple.com
Mon Sep 12 11:09:13 PDT 2011


On Aug 31, 2011, at 5:06 AM, arrowdodger wrote:

> On Sat, Aug 6, 2011 at 2:21 PM, arrowdodger <6yearold at gmail.com> wrote:
> Hi, there is LLVM_MULTITHREADED define which is actually indicates presence of atomic builtins in the host system. Such name may confuse developers in future and already confused someone at lib/Support/Threading.cpp - he used this define to check whether LLVM is built with threading support. This mistake is currently blocking single-threaded build on Unix.
> 
> This patch do following things:
> 1. Rename LLVM_MULTITHREADED to LLVM_HAVE_ATOMICS in CMake checking code and configure.ac, fix description of this option.
> 2. Replaces all uses of old define with new one.
> 3. Fix lib/Support/Threading.cpp file by using ENABLE_THREADS define instead of LLVM_MULTITHREADED.
> 
> Ping.
> <llvm.atomics.define.diff>_______________________________________________

Sorry for the delay. In general the patch is fine, could you change these couple of things?

LLVM_HAVE_ATOMICS -> LLVM_HAS_ATOMICS

and

-#if LLVM_MULTITHREADED==0
+#if LLVM_HAVE_ATOMICS==0 || !defined(LLVM_HAVE_ATOMICS)

to just #if LLVM_HAS_ATOMICS

this latter is ok because we define it either way so there's always a value at least as far as the autoconf bits are concerned. If this isn't true for the cmake bits let me know.

-eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110912/e4e7cc43/attachment.html>


More information about the llvm-commits mailing list