[PATCH] D36720: [libc++] Prevent stale site configuration headers

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 11:25:07 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL313284: [libc++] Prevent stale site configuration headers (authored by smeenai).

Changed prior to commit:
  https://reviews.llvm.org/D36720?vs=111096&id=115250#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36720

Files:
  libcxx/trunk/CMakeLists.txt


Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -615,9 +615,10 @@
   config_define(ON _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
 endif()
 
+set(site_config_path "${LIBCXX_BINARY_DIR}/__config_site")
 if (LIBCXX_NEEDS_SITE_CONFIG)
   configure_file("include/__config_site.in"
-                 "${LIBCXX_BINARY_DIR}/__config_site"
+                 "${site_config_path}"
                  @ONLY)
 
   # Provide the config definitions by included the generated __config_site
@@ -627,6 +628,11 @@
   else()
     add_compile_flags("-include ${LIBCXX_BINARY_DIR}/__config_site")
   endif()
+else()
+  if (EXISTS "${site_config_path}")
+    message(STATUS "Removing stale site configuration ${site_config_path}")
+    file(REMOVE "${site_config_path}")
+  endif()
 endif()
 
 #===============================================================================


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36720.115250.patch
Type: text/x-patch
Size: 971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170914/5147a4aa/attachment.bin>


More information about the cfe-commits mailing list