[profile] Speculative fix for Windows after D68351
authorVedant Kumar <vsk@apple.com>
Thu, 31 Oct 2019 23:22:07 +0000 (16:22 -0700)
committerVedant Kumar <vsk@apple.com>
Thu, 31 Oct 2019 23:23:39 +0000 (16:23 -0700)
setenv() appears to not be available on Windows:

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/53545/steps/stage%201%20build/logs/stdio

compiler-rt/lib/profile/InstrProfilingPort.h

index 9462cf1..ceafdb9 100644 (file)
@@ -105,6 +105,7 @@ static inline size_t getpagesize() {
   GetNativeSystemInfo(&S);
   return S.dwPageSize;
 }
+#define setenv _putenv
 #else /* defined(_WIN32) */
 #include <unistd.h>
 #endif /* defined(_WIN32) */