diff options
| -rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 1 | ||||
| -rw-r--r-- | llvm/test/MC/COFF/timestamp.s | 4 | ||||
| -rw-r--r-- | llvm/test/lit.cfg | 4 | ||||
| -rw-r--r-- | llvm/test/lit.site.cfg.in | 1 |
4 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index 59f06dcd113..ffb636a5932 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -17,6 +17,7 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Twine.h" +#include "llvm/Config/config.h" #include "llvm/MC/MCAsmLayout.h" #include "llvm/MC/MCAssembler.h" #include "llvm/MC/MCContext.h" diff --git a/llvm/test/MC/COFF/timestamp.s b/llvm/test/MC/COFF/timestamp.s index 917e1e717a8..ae982b4309e 100644 --- a/llvm/test/MC/COFF/timestamp.s +++ b/llvm/test/MC/COFF/timestamp.s @@ -1,4 +1,6 @@ // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj -h | FileCheck %s +// REQUIRES: timestamps // CHECK: ImageFileHeader { -// CHECK: TimeDateStamp: {{.*}} +// CHECK: TimeDateStamp: +// CHECK-NOT: 1970-01-01 00:00:00 (0x0) diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index 9fb9fb2b4de..3fb94e43f72 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -463,6 +463,10 @@ if platform.system() in ['Windows'] and re.match(r'.*-win32$', config.target_tri if not re.match(r'^x86_64.*-(mingw32|windows-gnu|win32)', config.target_triple): config.available_features.add('debug_frame') +# Check if we are embedding timestamps. +if config.enable_timestamps: + config.available_features.add('timestamps') + # Check if we should use gmalloc. use_gmalloc_str = lit_config.params.get('use_gmalloc', None) if use_gmalloc_str is not None: diff --git a/llvm/test/lit.site.cfg.in b/llvm/test/lit.site.cfg.in index 13f5372ef7e..ae5814f02f4 100644 --- a/llvm/test/lit.site.cfg.in +++ b/llvm/test/lit.site.cfg.in @@ -36,6 +36,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" config.have_zlib = "@HAVE_LIBZ@" config.have_dia_sdk = @HAVE_DIA_SDK@ config.enable_ffi = "@LLVM_ENABLE_FFI@" +config.enable_timestamps = "@ENABLE_TIMESTAMPS@" config.test_examples = "@ENABLE_EXAMPLES@" # Support substitution of the tools_dir with user parameters. This is |

