[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. llvm-svn: 273333
This commit is contained in:
parent
1770355d76
commit
62ef3bfd3d
|
@ -73,7 +73,13 @@ function(add_ocaml_library name)
|
||||||
|
|
||||||
get_property(system_libs TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS)
|
get_property(system_libs TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS)
|
||||||
foreach(system_lib ${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()
|
endforeach()
|
||||||
|
|
||||||
string(REPLACE ";" " " ARG_CFLAGS "${ARG_CFLAGS}")
|
string(REPLACE ";" " " ARG_CFLAGS "${ARG_CFLAGS}")
|
||||||
|
|
Loading…
Reference in New Issue