Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable LTO for pybind11 too when enable_lto=off.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 16 May 2019 07:37:59 +0000 (09:37 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 16 May 2019 07:59:56 +0000 (09:59 +0200)
Fix simgrid/simgrid#12 (FramaGit).

CMakeLists.txt
ChangeLog

index 12d1189..edbe5aa 100644 (file)
@@ -798,7 +798,10 @@ endif()
 if(enable_python)
   if(pybind11_FOUND)
     message(STATUS "Found pybind11, with C++14.")
 if(enable_python)
   if(pybind11_FOUND)
     message(STATUS "Found pybind11, with C++14.")
-    pybind11_add_module(python-bindings src/bindings/python/simgrid_python.cpp)
+    if(NOT enable_lto)
+      set(pybind11_options NO_EXTRAS)
+    endif()
+    pybind11_add_module(python-bindings src/bindings/python/simgrid_python.cpp ${pybind11_options})
     target_compile_features(python-bindings PRIVATE cxx_std_14)
     target_link_libraries(python-bindings PUBLIC simgrid)
     set_target_properties(python-bindings PROPERTIES
     target_compile_features(python-bindings PRIVATE cxx_std_14)
     target_link_libraries(python-bindings PUBLIC simgrid)
     set_target_properties(python-bindings PROPERTIES
index a9eba49..a84b49e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@ Fixed bugs (GH=GitHub; FG=FramaGit):
  - FG#7: simple cmake call requires doxygen
  - FG#10: Can not use MSG_process_set_data from SMPI any more
  - FG#11: Auto-restart actors forget their on_exit behavior
  - FG#7: simple cmake call requires doxygen
  - FG#10: Can not use MSG_process_set_data from SMPI any more
  - FG#11: Auto-restart actors forget their on_exit behavior
+ - FG#12: -Denable_lto=OFF doesn't disable LTO
  - GH#133: Java : a process can run on a VM even if its host is off
  - GH#326: Valgrind-detected error for join() when energy plugin is activated
 
  - GH#133: Java : a process can run on a VM even if its host is off
  - GH#326: Valgrind-detected error for join() when energy plugin is activated