llvm.org GIT mirror llvm / 38ae857
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273333 91177308-0d34-0410-b5e6-96231b3b80d8 Artem Belevich 4 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
7272
7373 get_property(system_libs TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS)
7474 foreach(system_lib ${system_libs})
75 list(APPEND ocaml_flags "-l${system_lib}" )
75 if (system_lib MATCHES "^-")
76 # If it's an option, pass it without changes.
77 list(APPEND ocaml_flags "${system_lib}" )
78 else()
79 # Otherwise assume it's a library name we need to link with.
80 list(APPEND ocaml_flags "-l${system_lib}" )
81 endif()
7682 endforeach()
7783
7884 string(REPLACE ";" " " ARG_CFLAGS "${ARG_CFLAGS}")