Unverified Commit 90640854 authored by Robert Kimball's avatar Robert Kimball Committed by GitHub

change debug enable from cmake flag to environment var so it can be c… (#462)

* change debug enable from cmake flag to environment var so it can be changed without rebuild
parent 8d938e32
...@@ -186,8 +186,6 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND ...@@ -186,8 +186,6 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND
"EIGEN_HEADERS_PATH=\"${EIGEN_INCLUDE_DIR}\";MKLDNN_HEADERS_PATH=\"${MKLDNN_INCLUDE_DIR}\";CLANG_BUILTIN_HEADERS_PATH=\"${LLVM_LIB_DIR}/clang/5.0.1/include\";NGRAPH_HEADERS_PATH=\"${NGRAPH_INCLUDE_PATH}\";INSTALLED_HEADERS_PATH=\"${CMAKE_INSTALL_PREFIX}/include\";") "EIGEN_HEADERS_PATH=\"${EIGEN_INCLUDE_DIR}\";MKLDNN_HEADERS_PATH=\"${MKLDNN_INCLUDE_DIR}\";CLANG_BUILTIN_HEADERS_PATH=\"${LLVM_LIB_DIR}/clang/5.0.1/include\";NGRAPH_HEADERS_PATH=\"${NGRAPH_INCLUDE_PATH}\";INSTALLED_HEADERS_PATH=\"${CMAKE_INSTALL_PREFIX}/include\";")
endif() endif()
set(NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING "Enable debuginfo in the CPU backend") set(NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING "Enable debuginfo in the CPU backend")
set_property(SOURCE codegen/compiler.cpp APPEND_STRING PROPERTY COMPILE_DEFINITIONS
"NGCPU_DEBUGINFO=${NGRAPH_CPU_DEBUGINFO_ENABLE};")
# GPU backend current requires CPU because they share compiler.cpp, # GPU backend current requires CPU because they share compiler.cpp,
# and compiler.cpp requires MKLDNN # and compiler.cpp requires MKLDNN
......
...@@ -123,7 +123,7 @@ static std::string GetExecutablePath(const char* Argv0) ...@@ -123,7 +123,7 @@ static std::string GetExecutablePath(const char* Argv0)
codegen::StaticCompiler::StaticCompiler() codegen::StaticCompiler::StaticCompiler()
: m_precompiled_header_valid(false) : m_precompiled_header_valid(false)
, m_debuginfo_enabled(false) , m_debuginfo_enabled((std::getenv("NGRAPH_COMPILER_DEBUGINFO_ENABLE") != nullptr))
, m_enable_diag_output((std::getenv("NGRAPH_COMPILER_DIAG_ENABLE") != nullptr)) , m_enable_diag_output((std::getenv("NGRAPH_COMPILER_DIAG_ENABLE") != nullptr))
, m_source_name("code.cpp") , m_source_name("code.cpp")
{ {
...@@ -133,9 +133,6 @@ codegen::StaticCompiler::StaticCompiler() ...@@ -133,9 +133,6 @@ codegen::StaticCompiler::StaticCompiler()
void codegen::StaticCompiler::initialize() void codegen::StaticCompiler::initialize()
{ {
m_extra_search_path_list.clear(); m_extra_search_path_list.clear();
#if NGCPU_DEBUGINFO
m_debuginfo_enabled = true;
#endif
InitializeNativeTarget(); InitializeNativeTarget();
LLVMInitializeNativeAsmPrinter(); LLVMInitializeNativeAsmPrinter();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment