[LLVMdev] Cross-compiling llvm/clang osx -> win32

NAKAMURA Takumi geek4civic at gmail.com
Thu Sep 6 08:16:36 PDT 2012


Antonie,

I wonder you would need pecoff-aware binutils.
That said, I have not tried building compiler-rt as cross-build
targetting to Win32.

You might attempt;

  - Obtain mingw32-cross binutils, i686-pc-mingw32-XXX.
  - Build the tree with --target=i686-pc-mingw32.

I will attempt such a configuration later.

...Takumi

2012/9/6 Antoine Missout <antoine.missout at metakine.com>:
> Hi,
>
> I'm trying to compile llvm/clang so that: it is compiled on osx 10.6, it runs on osx, but it outputs win32 objects.
>
> More exactly, I'm building an app which generates a .c file that doesn't include or link with anything, and I'd like to be able to make a win32 .dll of it on osx.
>
> Below is what I'm getting. Full log is here:
> http://pastebin.com/KsPGvAfW
>
> It fails while building compiler-rt.
>
> Any hints on how I could accomplish this ?
>
> Regards,
> Antoine M.
>
> ----------------------------------------------------------------------
> 08:16:03:~/Desktop/ThirdParty/build $ ../llvm-3.1.src/configure --enable-targets=x86,x86_64 --target=i386-winnt && make
> checking for clang... clang
> checking for C compiler default output file name... a.out
>
> [...snip...]
>
> llvm[4]: ======= Finished Linking Release+Asserts Executable clang-check (without symbols)
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'eprintf'
> warning: clang_darwin.mk: dropping arch 'i386' from lib '10.4'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib '10.4'
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'ios'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'ios'
> warning: clang_darwin.mk: dropping arch 'armv6' from lib 'ios'
> warning: clang_darwin.mk: dropping arch 'armv7' from lib 'ios'
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'osx'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'osx'
> warning: clang_darwin.mk: dropping arch 'armv6' from lib 'cc_kext'
> warning: clang_darwin.mk: dropping arch 'armv7' from lib 'cc_kext'
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'cc_kext'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'cc_kext'
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'profile_osx'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'profile_osx'
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'profile_ios'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'profile_ios'
> warning: clang_darwin.mk: dropping arch 'armv6' from lib 'profile_ios'
> warning: clang_darwin.mk: dropping arch 'armv7' from lib 'profile_ios'
> warning: clang_darwin.mk: dropping arch 'i386' from lib 'asan_osx'
> warning: clang_darwin.mk: dropping arch 'x86_64' from lib 'asan_osx'
>   MKDIR:     /Users/makira/Desktop/git_repository/sonicbirth/ThirdParty/build/tools/clang/runtime/compiler-rt/clang_darwin/eprintf
>   FINAL-ARCHIVE: clang_darwin/eprintf: /Users/makira/Desktop/git_repository/sonicbirth/ThirdParty/build/tools/clang/runtime/compiler-rt/clang_darwin/eprintf/libcompiler_rt.a
> lipo: no input files specified
> lipo: Usage: lipo [input_file] ... [-arch <arch_type> input_file] ... [-info] [-detailed_info] [-output output_file] [-create] [-arch_blank <arch_type>] [-thin <arch_type>] [-remove <arch_type>] ... [-extract <arch_type>] ... [-extract_family <arch_type>] ... [-verify_arch <arch_type> ...] [-replace <arch_type> <file_name>] ...
> make[5]: *** [/Users/makira/Desktop/git_repository/sonicbirth/ThirdParty/build/tools/clang/runtime/compiler-rt/clang_darwin/eprintf/libcompiler_rt.a] Error 1
> make[4]: *** [BuildRuntimeLibraries] Error 2
> make[3]: *** [compiler-rt/.makeall] Error 2
> make[2]: *** [all] Error 1
> make[1]: *** [clang/.makeall] Error 2
> make: *** [all] Error 1
> 08:36:34:~/Desktop/ThirdParty/build $
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list