Skip to content

Commit fcac3c9

Browse files
committedJan 24, 2018
libcxx: Allow auto-linking to be disabled with a macro.
Some users may have a custom build system which gives a different name to the libc++ archive (or does not create an archive at all, instead passing the object files directly to the linker). Give those users a way to disable auto-linking. Differential Revision: https://reviews.llvm.org/D42436 llvm-svn: 323300
1 parent 70683b2 commit fcac3c9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed
 

‎libcxx/include/__config

+7-5
Original file line numberDiff line numberDiff line change
@@ -1285,13 +1285,15 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
12851285
# endif
12861286
#endif // defined(_LIBCPP_HAS_NO_PRAGMA_PUSH_POP_MACRO)
12871287

1288-
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
1289-
# if defined(_DLL)
1288+
#ifndef _LIBCPP_NO_AUTO_LINK
1289+
# if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
1290+
# if defined(_DLL)
12901291
# pragma comment(lib, "c++.lib")
1291-
# else
1292+
# else
12921293
# pragma comment(lib, "libc++.lib")
1293-
# endif
1294-
#endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
1294+
# endif
1295+
# endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
1296+
#endif // _LIBCPP_NO_AUTO_LINK
12951297

12961298
#endif // __cplusplus
12971299

0 commit comments

Comments
 (0)
Please sign in to comment.