summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/update_pch6
-rw-r--r--include/osl/time.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/bin/update_pch b/bin/update_pch
index 974d53ab9197..e47a97994bb2 100755
--- a/bin/update_pch
+++ b/bin/update_pch
@@ -690,6 +690,12 @@ def is_allowed_if(line, module):
# Our sources always build with LIBO_INTERNAL_ONLY.
if line == "#if defined LIBO_INTERNAL_ONLY" or line == "#ifdef LIBO_INTERNAL_ONLY":
return True
+ # We use PCHs only for C++.
+ if line == "#if defined(__cplusplus)" or line == "#if defined __cplusplus":
+ return True
+ # Debug-specific code, it shouldn't hurt including it unconditionally.
+ if line == "#ifdef DBG_UTIL" or line == "#if OSL_DEBUG_LEVEL > 0":
+ return True
if module == "external/skia":
# We always set these.
if line == "#ifdef SK_VULKAN" or line == "#if SK_SUPPORT_GPU":
diff --git a/include/osl/time.h b/include/osl/time.h
index 43661d4ac421..5c5096cada8a 100644
--- a/include/osl/time.h
+++ b/include/osl/time.h
@@ -26,9 +26,11 @@
#include "sal/config.h"
-#if defined LIBO_INTERNAL_ONLY && defined __cplusplus
+#if defined LIBO_INTERNAL_ONLY
+#if defined __cplusplus
#include <chrono>
#endif
+#endif
#include "sal/saldllapi.h"
#include "sal/types.h"