[PATCH] D35898: [OCaml] Pass -D/-UNDEBUG through to ocamlc
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 29 01:11:04 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL309483: [OCaml] Pass -D/-UNDEBUG through to ocamlc (authored by mgorny).
Changed prior to commit:
https://reviews.llvm.org/D35898?vs=108778&id=108779#toc
Repository:
rL LLVM
https://reviews.llvm.org/D35898
Files:
llvm/trunk/cmake/modules/AddOCaml.cmake
Index: llvm/trunk/cmake/modules/AddOCaml.cmake
===================================================================
--- llvm/trunk/cmake/modules/AddOCaml.cmake
+++ llvm/trunk/cmake/modules/AddOCaml.cmake
@@ -87,6 +87,11 @@
foreach( include_dir ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR} )
set(c_flags "${c_flags} -I${include_dir}")
endforeach()
+ # include -D/-UNDEBUG to match dump function visibility
+ # regex from HandleLLVMOptions.cmake
+ string(REGEX MATCH "(^| )[/-][UD] *NDEBUG($| )" flag_matches
+ "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${CMAKE_C_FLAGS}")
+ set(c_flags "${c_flags} ${flag_matches}")
foreach( ocaml_file ${ARG_OCAML} )
list(APPEND sources "${ocaml_file}.mli" "${ocaml_file}.ml")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35898.108779.patch
Type: text/x-patch
Size: 747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170729/86679570/attachment.bin>
More information about the llvm-commits
mailing list