[llvm] r273333 - [build] Fixed build break for OCaml bindings.
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 16:10:37 PDT 2016
Author: tra
Date: Tue Jun 21 18:10:37 2016
New Revision: 273333
URL: http://llvm.org/viewvc/llvm-project?rev=273333&view=rev
Log:
[build] Fixed build break for OCaml bindings.
After r273302 LLVM_SYSTEM_LIBS may have entries that already have
-l prefix and we need to deal with that.
Modified:
llvm/trunk/cmake/modules/AddOCaml.cmake
Modified: llvm/trunk/cmake/modules/AddOCaml.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddOCaml.cmake?rev=273333&r1=273332&r2=273333&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddOCaml.cmake (original)
+++ llvm/trunk/cmake/modules/AddOCaml.cmake Tue Jun 21 18:10:37 2016
@@ -73,7 +73,13 @@ function(add_ocaml_library name)
get_property(system_libs TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS)
foreach(system_lib ${system_libs})
- list(APPEND ocaml_flags "-l${system_lib}" )
+ if (system_lib MATCHES "^-")
+ # If it's an option, pass it without changes.
+ list(APPEND ocaml_flags "${system_lib}" )
+ else()
+ # Otherwise assume it's a library name we need to link with.
+ list(APPEND ocaml_flags "-l${system_lib}" )
+ endif()
endforeach()
string(REPLACE ";" " " ARG_CFLAGS "${ARG_CFLAGS}")
More information about the llvm-commits
mailing list