[libcxx-commits] [PATCH] D125922: [libcxx] [test] Don't use header defines for detecting linking against a DLL

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 2 07:54:46 PDT 2022


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxx/utils/libcxx/test/features.py:233-245
+#            #include <iostream>
+#            #include <windows.h>
+#            #include <winnt.h>
+#            int main(int, char**) {
+#              void *ptr = &std::cout;
+#              void *exe = GetModuleHandle(NULL);
+#              PIMAGE_DOS_HEADER dosheader = (PIMAGE_DOS_HEADER)exe;
----------------
Would this really work with other standard libraries? If so, I think this is the better alternative.

Whichever check you end up going for, I would add a short comment explaining how the check works, because it's not obvious for a non-Windows-savy person.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125922/new/

https://reviews.llvm.org/D125922



More information about the libcxx-commits mailing list