Skip to content

Commit 71166d9

Browse files
authored
Wrap the files in if(LLVM_LIBC_FULL_BUILD) so that they won't show up on Windows and Mac overlay builds.
1 parent 4985ce1 commit 71166d9

File tree

2 files changed

+47
-41
lines changed

2 files changed

+47
-41
lines changed

libc/src/stdlib/CMakeLists.txt

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,37 +65,40 @@ add_entrypoint_object(
6565
libc.config.app_h
6666
)
6767

68-
add_object_library(
69-
environ_internal
70-
SRCS
71-
environ_internal.cpp
72-
HDRS
73-
environ_internal.h
74-
DEPENDS
75-
libc.config.app_h
76-
libc.hdr.types.size_t
77-
libc.src.__support.CPP.string_view
78-
libc.src.__support.threads.mutex
79-
libc.src.stdlib.free
80-
libc.src.stdlib.malloc
81-
libc.src.string.memcpy
82-
)
68+
# Environment variable functions only make sense in full build mode.
69+
if(LLVM_LIBC_FULL_BUILD)
70+
add_object_library(
71+
environ_internal
72+
SRCS
73+
environ_internal.cpp
74+
HDRS
75+
environ_internal.h
76+
DEPENDS
77+
libc.config.app_h
78+
libc.hdr.types.size_t
79+
libc.src.__support.CPP.string_view
80+
libc.src.__support.threads.mutex
81+
libc.src.stdlib.free
82+
libc.src.stdlib.malloc
83+
libc.src.string.memcpy
84+
)
8385

84-
add_entrypoint_object(
85-
setenv
86-
SRCS
87-
setenv.cpp
88-
HDRS
89-
setenv.h
90-
DEPENDS
91-
.environ_internal
92-
libc.src.__support.CPP.string_view
93-
libc.src.__support.libc_errno
94-
libc.src.__support.threads.mutex
95-
libc.src.stdlib.malloc
96-
libc.src.string.memcpy
97-
libc.src.string.strlen
98-
)
86+
add_entrypoint_object(
87+
setenv
88+
SRCS
89+
setenv.cpp
90+
HDRS
91+
setenv.h
92+
DEPENDS
93+
.environ_internal
94+
libc.src.__support.CPP.string_view
95+
libc.src.__support.libc_errno
96+
libc.src.__support.threads.mutex
97+
libc.src.stdlib.malloc
98+
libc.src.string.memcpy
99+
libc.src.string.strlen
100+
)
101+
endif()
99102

100103
add_entrypoint_object(
101104
strfromf

libc/test/integration/src/stdlib/CMakeLists.txt

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ add_integration_test(
1717
GERMANY=Berlin
1818
)
1919

20-
add_integration_test(
21-
setenv_test
22-
SUITE
23-
stdlib-integration-tests
24-
SRCS
25-
setenv_test.cpp
26-
DEPENDS
27-
libc.src.stdlib.getenv
28-
libc.src.stdlib.setenv
29-
libc.src.string.strcmp
30-
)
20+
# Environment variable functions only make sense in full build mode.
21+
if(LLVM_LIBC_FULL_BUILD)
22+
add_integration_test(
23+
setenv_test
24+
SUITE
25+
stdlib-integration-tests
26+
SRCS
27+
setenv_test.cpp
28+
DEPENDS
29+
libc.src.stdlib.getenv
30+
libc.src.stdlib.setenv
31+
libc.src.string.strcmp
32+
)
33+
endif()

0 commit comments

Comments
 (0)