[cfe-dev] Clang-cl and C Blocks extension
Saleem Abdulrasool via cfe-dev
cfe-dev at lists.llvm.org
Wed Jul 18 10:34:31 PDT 2018
On Mon, Jul 9, 2018 at 12:57 PM, Shoaib Meenai via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> (adding back cfe-dev)
>
>
>
> You'll need to link against a blocks runtime library. compiler-rt provides
> one (under lib/BlocksRuntime). I haven't tried building that under Windows,
> but I do see some _WIN32 defines in the source code, so hopefully it should
> work?
>
The better maintained version is currently in swift-corelibs-foundation,
under a directory called closure.
https://github.com/apple/swift-corelibs-foundation/tree/master/closure
>
> *From: *Thorben Hasenpusch <t.hasenpusch at icloud.com>
> *Date: *Monday, July 9, 2018 at 12:40 PM
> *To: *Shoaib Meenai <smeenai at fb.com>
> *Subject: *Re: [cfe-dev] Clang-cl and C Blocks extension
>
>
>
> But sadly, when trying to link I get this error: LNK2001: unresolved
> external symbol __imp__NSConcreteStackBlock.
>
>
>
> Do I have to link against something specific?
>
>
>
> On 9. Jul 2018, at 21:32, Thorben Hasenpusch <t.hasenpusch at icloud.com>
> wrote:
>
> Thank you! That did the trick.
>
> On 9. Jul 2018, at 21:11, Shoaib Meenai <smeenai at fb.com> wrote:
>
> You can pass "-Xclang -fblocks" on the command line to pass the option to
> cc1 directly.
>
> From: cfe-dev <cfe-dev-bounces at lists.llvm.org> on behalf of cfe-dev <
> cfe-dev at lists.llvm.org>
>
> Reply-To: Thorben Hasenpusch <t.hasenpusch at icloud.com>
>
> Date: Monday, July 9, 2018 at 12:06 PM
>
> To: cfe-dev <cfe-dev at lists.llvm.org>
>
> Subject: [cfe-dev] Clang-cl and C Blocks extension
>
> Hi guys,
>
> I’m trying to compile C code that uses the Blocks extension using clang-cl
> on Windows, via CMake’s LLVM-vs2014 toolset.
>
> The compilation errors out, telling me I’d need to enable blocks by
> passing “-fblocks” to clang, however clang-cl doesn’t recognize that flag.
>
> Anything I can do?
>
> Thanks,
>
> Thorben
>
> _______________________________________________
>
> cfe-dev mailing list
>
> cfe-dev at lists.llvm.org
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.
> llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=DwIGaQ&c=
> 5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=
> fXBg7mDMRpD5aFTwSkVGzQm_l-nEhQH52nOfnloTUfQ&s=
> eHXwWPv2JNzLoZeGlAh0qgOk3shPlYskr6yRzxNvjE0&e=
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180718/2be33706/attachment.html>
More information about the cfe-dev
mailing list