authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2019-11-24 15:29:43-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-25 19:08:36-05:00
logfe254ea309f7e95f492d8c8e706c73267082b5a3
tree62ed31fa54869c3fe254d84a59267ef7c2ba0eb4
parent80f79cc9e8ed02f631c9d59f68e5f20a909e85fc

stage1: avoid building empty memory_profiling.cpp

During build an empty .o on macOS/Xcode emits warning: ranlib: file: zig_cpp/libcompiler.a(memory_profiling.cpp.o) has no symbols ranlib: file: zig_cpp/libcompiler.a(memory_profiling.cpp.o) has no symbols

1 files changed, 5 insertions(+), 1 deletions(-)

CMakeLists.txt+5-1
......@@ -438,6 +438,10 @@ set(ZIG_MAIN_SRC "${CMAKE_SOURCE_DIR}/src/main.cpp")
438438# This is our shim which will be replaced by libuserland written in Zig.
439439set(ZIG0_SHIM_SRC "${CMAKE_SOURCE_DIR}/src/userland.cpp")
440440
441if(ZIG_ENABLE_MEM_PROFILE)
442 set(ZIG_SOURCES_MEM_PROFILE "${CMAKE_SOURCE_DIR}/src/memory_profiling.cpp")
443endif()
444
441445set(ZIG_SOURCES
442446 "${CMAKE_SOURCE_DIR}/src/analyze.cpp"
443447 "${CMAKE_SOURCE_DIR}/src/ast_render.cpp"
......@@ -456,7 +460,6 @@ set(ZIG_SOURCES
456460 "${CMAKE_SOURCE_DIR}/src/ir_print.cpp"
457461 "${CMAKE_SOURCE_DIR}/src/libc_installation.cpp"
458462 "${CMAKE_SOURCE_DIR}/src/link.cpp"
459 "${CMAKE_SOURCE_DIR}/src/memory_profiling.cpp"
460463 "${CMAKE_SOURCE_DIR}/src/os.cpp"
461464 "${CMAKE_SOURCE_DIR}/src/parser.cpp"
462465 "${CMAKE_SOURCE_DIR}/src/range_set.cpp"
......@@ -464,6 +467,7 @@ set(ZIG_SOURCES
464467 "${CMAKE_SOURCE_DIR}/src/tokenizer.cpp"
465468 "${CMAKE_SOURCE_DIR}/src/translate_c.cpp"
466469 "${CMAKE_SOURCE_DIR}/src/util.cpp"
470 "${ZIG_SOURCES_MEM_PROFILE}"
467471)
468472set(OPTIMIZED_C_SOURCES
469473 "${CMAKE_SOURCE_DIR}/src/blake2b.c"