[llvm-branch-commits] [llvm-branch] r309591 - Merging r309483:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jul 31 10:39:07 PDT 2017
Author: hans
Date: Mon Jul 31 10:39:07 2017
New Revision: 309591
URL: http://llvm.org/viewvc/llvm-project?rev=309591&view=rev
Log:
Merging r309483:
------------------------------------------------------------------------
r309483 | mgorny | 2017-07-29 01:10:24 -0700 (Sat, 29 Jul 2017) | 7 lines
[OCaml] Pass -D/-UNDEBUG through to ocamlc
Detect [/-][DU]NDEBUG in CMAKE_C_FLAGS* and pass them through to ocamlc.
This is necessary because their value might affect visibility of dump
functions in LLVM and ocamlc uses its own compiler and flags by default.
Differential Revision: https://reviews.llvm.org/D35898
------------------------------------------------------------------------
Modified:
llvm/branches/release_50/ (props changed)
llvm/branches/release_50/cmake/modules/AddOCaml.cmake
Propchange: llvm/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 31 10:39:07 2017
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,308483-308484,308503,308808,308813,308891,308906,308950,308963,308978,308986,309113,309302,309321,309323,309325,309343,309353,309355,309422
+/llvm/trunk:155241,308483-308484,308503,308808,308813,308891,308906,308950,308963,308978,308986,309113,309302,309321,309323,309325,309343,309353,309355,309422,309483
Modified: llvm/branches/release_50/cmake/modules/AddOCaml.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_50/cmake/modules/AddOCaml.cmake?rev=309591&r1=309590&r2=309591&view=diff
==============================================================================
--- llvm/branches/release_50/cmake/modules/AddOCaml.cmake (original)
+++ llvm/branches/release_50/cmake/modules/AddOCaml.cmake Mon Jul 31 10:39:07 2017
@@ -87,6 +87,11 @@ function(add_ocaml_library name)
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")
More information about the llvm-branch-commits
mailing list