Skip to content

Commit 419d17e

Browse files
gmittertJason Mittertreiner
authored andcommitted
Fix Windows Build
- Set up config and llvm-config.h to not be unix specific - Import WindowsSupport.h and VerisonTuple.h
1 parent 888b53c commit 419d17e

File tree

8 files changed

+1048
-5
lines changed

8 files changed

+1048
-5
lines changed

Utilities/import-llvm

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Support_imports = [
3939
'ManagedStatic', 'MathExtras', 'Mutex', 'MutexGuard', 'Memory',
4040
'MemoryBuffer', 'PointerLikeTypeTraits', 'Recycler', 'SwapByteOrder',
4141
'Timer', 'TimeValue', 'Threading', 'Unicode', 'UniqueLock', 'Unix', 'WindowsError',
42-
'Valgrind', 'circular_raw_ostream', 'raw_ostream', 'Signposts', 'type_traits', 'JSON']
42+
'Valgrind', 'circular_raw_ostream', 'raw_ostream', 'Signposts', 'type_traits', 'JSON', 'WindowsSupport']
4343

4444
# Stuff we don't want, but have to pull in.
4545
Support_imports += [
@@ -50,7 +50,7 @@ Support_imports += [
5050
'FormatVariadicDetails', 'NativeFormatting', 'DJB', 'ReverseIteration', 'MD5',
5151
'SmallVectorMemoryBuffer', 'WithColor', 'Options', 'PrettyStackTrace', 'Watchdog',
5252
'TargetParser', 'ARMBuildAttributes', 'ARMTargetParser', 'AArch64TargetParser',
53-
'ARMTargetParser.def', 'AArch64TargetParser.def', 'X86TargetParser.def', 'LineIterator']
53+
'ARMTargetParser.def', 'AArch64TargetParser.def', 'X86TargetParser.def', 'LineIterator', 'VersionTuple']
5454

5555
# Dependencies from llvm-c needed by Support.
5656
C_imports = ['Types', 'DataTypes', 'Support', 'Error', 'ErrorHandling']
@@ -198,6 +198,17 @@ def main():
198198
for file in files:
199199
maybe_add_prefix(os.path.join(root, file), include_dir)
200200

201+
print("")
202+
print("Copying llvm config files")
203+
# NOTE: If you're updating to a newer llvm, you may have to manually merge
204+
# these with the newer version produced by the llvm build
205+
indexstore_llvm_config_source = os.path.join(indexstoredb_srcroot, 'Utilities', 'import-llvm.d', 'include', 'llvm', 'Config')
206+
indexstore_llvm_config_target = os.path.join(include_dir, 'llvm', 'Config')
207+
shutil.copyfile(os.path.join(indexstore_llvm_config_source, 'config.h'),
208+
os.path.join(indexstore_llvm_config_target, 'config.h'))
209+
shutil.copyfile(os.path.join(indexstore_llvm_config_source, 'llvm-config.h'),
210+
os.path.join(indexstore_llvm_config_target, 'llvm-config.h'))
211+
201212
print ""
202213
print "Applying patch"
203214

0 commit comments

Comments
 (0)