[PATCH] EXPORTED_SYMBOL_FILE using mingw and cmake

Mueller-Roemer, Johannes Sebastian Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de
Wed Oct 22 23:59:29 PDT 2014


It has to be moved there beause Cygwin uses forward slashes (and cat), as it is a full-fledged posix environment.
Assuming WIN32 unconditionally should be fine, as by default the whole block uses type instead of cat. Which is Windows only.
________________________________________
From: Chris Bieneman [beanz at apple.com]
Sent: Wednesday, October 22, 2014 5:57 PM
To: Mueller-Roemer, Johannes Sebastian
Cc: beanz at apple.com; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] EXPORTED_SYMBOL_FILE using mingw and cmake

In general I don't think I should be the one to review this patch because it seems to be Windows specific, and I don't really do dev on Windows. However, since you ping'd me, see my comment below.

REPOSITORY
  rL LLVM

================
Comment at: cmake/modules/AddLLVM.cmake:96
@@ -91,1 +95,3 @@
+      # http://public.kitware.com/Bug/print_bug_page.php?bug_id=5939 )
+      string(REPLACE / \\ export_file_backslashes ${export_file})
     endif()
----------------
By moving the definition of export_file_backslashes into this else clause it won't be defined on Cygwin, so I don't think this will build.

I also think this should probably actually be in a separate if block for "if (WIN32 and not CYGWIN)". My reasoning for that (which may be wrong, so take it with some salt) is you're in a block now that is basically "if (not Darwin and not LLVM_HAVE_LINK_VERSION_SCRIPT)". In practice that seems to mean WIN32, but I don't think that is a hard requirement. In particular since this is really related to linker features it is plausible that in the near future lld may not require a link version script, and you could use it on any platform.

http://reviews.llvm.org/D5476






More information about the llvm-commits mailing list