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")...@@ -438,6 +438,10 @@ set(ZIG_MAIN_SRC "${CMAKE_SOURCE_DIR}/src/main.cpp")
438# This is our shim which will be replaced by libuserland written in Zig.438# This is our shim which will be replaced by libuserland written in Zig.
439set(ZIG0_SHIM_SRC "${CMAKE_SOURCE_DIR}/src/userland.cpp")439set(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
441set(ZIG_SOURCES445set(ZIG_SOURCES
442 "${CMAKE_SOURCE_DIR}/src/analyze.cpp"446 "${CMAKE_SOURCE_DIR}/src/analyze.cpp"
443 "${CMAKE_SOURCE_DIR}/src/ast_render.cpp"447 "${CMAKE_SOURCE_DIR}/src/ast_render.cpp"
...@@ -456,7 +460,6 @@ set(ZIG_SOURCES...@@ -456,7 +460,6 @@ set(ZIG_SOURCES
456 "${CMAKE_SOURCE_DIR}/src/ir_print.cpp"460 "${CMAKE_SOURCE_DIR}/src/ir_print.cpp"
457 "${CMAKE_SOURCE_DIR}/src/libc_installation.cpp"461 "${CMAKE_SOURCE_DIR}/src/libc_installation.cpp"
458 "${CMAKE_SOURCE_DIR}/src/link.cpp"462 "${CMAKE_SOURCE_DIR}/src/link.cpp"
459 "${CMAKE_SOURCE_DIR}/src/memory_profiling.cpp"
460 "${CMAKE_SOURCE_DIR}/src/os.cpp"463 "${CMAKE_SOURCE_DIR}/src/os.cpp"
461 "${CMAKE_SOURCE_DIR}/src/parser.cpp"464 "${CMAKE_SOURCE_DIR}/src/parser.cpp"
462 "${CMAKE_SOURCE_DIR}/src/range_set.cpp"465 "${CMAKE_SOURCE_DIR}/src/range_set.cpp"
...@@ -464,6 +467,7 @@ set(ZIG_SOURCES...@@ -464,6 +467,7 @@ set(ZIG_SOURCES
464 "${CMAKE_SOURCE_DIR}/src/tokenizer.cpp"467 "${CMAKE_SOURCE_DIR}/src/tokenizer.cpp"
465 "${CMAKE_SOURCE_DIR}/src/translate_c.cpp"468 "${CMAKE_SOURCE_DIR}/src/translate_c.cpp"
466 "${CMAKE_SOURCE_DIR}/src/util.cpp"469 "${CMAKE_SOURCE_DIR}/src/util.cpp"
470 "${ZIG_SOURCES_MEM_PROFILE}"
467)471)
468set(OPTIMIZED_C_SOURCES472set(OPTIMIZED_C_SOURCES
469 "${CMAKE_SOURCE_DIR}/src/blake2b.c"473 "${CMAKE_SOURCE_DIR}/src/blake2b.c"