[Lldb-commits] [lldb] 2a844c8 - Fix macOS buildbots after https://reviews.llvm.org/D115324.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 17 12:16:15 PST 2021
Author: Greg Clayton
Date: 2021-12-17T12:14:44-08:00
New Revision: 2a844c8869909960fb006a668d30c7349f55ee7e
URL: https://github.com/llvm/llvm-project/commit/2a844c8869909960fb006a668d30c7349f55ee7e
DIFF: https://github.com/llvm/llvm-project/commit/2a844c8869909960fb006a668d30c7349f55ee7e.diff
LOG: Fix macOS buildbots after https://reviews.llvm.org/D115324.
The test was attempting to make a universal x86_64/arm64 binary, but some older bots don't have a macOS SDK that can handle this. Switching over to using a yaml file instead should solve the problem.
Added:
lldb/test/API/functionalities/module_cache/universal/universal.yaml
Modified:
lldb/test/API/functionalities/module_cache/universal/TestModuleCacheUniversal.py
Removed:
lldb/test/API/functionalities/module_cache/universal/Makefile
lldb/test/API/functionalities/module_cache/universal/main.c
################################################################################
diff --git a/lldb/test/API/functionalities/module_cache/universal/Makefile b/lldb/test/API/functionalities/module_cache/universal/Makefile
deleted file mode 100644
index 71e8469bf1a88..0000000000000
--- a/lldb/test/API/functionalities/module_cache/universal/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-EXE := testit
-
-include Makefile.rules
-
-all: testit
-
-testit: testit.x86_64 testit.arm64
- lipo -create -o testit $^
-
-testit.arm64: testit.arm64.o
- $(CC) -isysroot $(SDKROOT) -target arm64-apple-macosx10.9 -o testit.arm64 $<
-
-testit.x86_64: testit.x86_64.o
- $(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o testit.x86_64 $<
-
-testit.arm64.o: main.c
- $(CC) -isysroot $(SDKROOT) -g -O0 -target arm64-apple-macosx10.9 -c -o testit.arm64.o $<
-
-testit.x86_64.o: main.c
- $(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64-apple-macosx10.9 -c -o testit.x86_64.o $<
diff --git a/lldb/test/API/functionalities/module_cache/universal/TestModuleCacheUniversal.py b/lldb/test/API/functionalities/module_cache/universal/TestModuleCacheUniversal.py
index 3898a5f292ac8..a39db4d1164b5 100644
--- a/lldb/test/API/functionalities/module_cache/universal/TestModuleCacheUniversal.py
+++ b/lldb/test/API/functionalities/module_cache/universal/TestModuleCacheUniversal.py
@@ -22,8 +22,6 @@ def setUp(self):
# artifacts directory so no other tests are interfered with.
self.runCmd('settings set symbols.lldb-index-cache-path "%s"' % (self.cache_dir))
self.runCmd('settings set symbols.enable-lldb-index-cache true')
- self.build()
-
def get_module_cache_files(self, basename):
module_file_glob = os.path.join(self.cache_dir, "llvmcache-*%s*" % (basename))
@@ -43,8 +41,12 @@ def test(self):
they will each have a unique directory.
"""
exe_basename = "testit"
+ src_dir = self.getSourceDir()
+ yaml_path = os.path.join(src_dir, "universal.yaml")
+ yaml_base, ext = os.path.splitext(yaml_path)
exe = self.getBuildArtifact(exe_basename)
-
+ self.yaml2obj(yaml_path, exe)
+ self.assertTrue(os.path.exists(exe))
# Create a module with no depedencies.
self.runCmd('target create -d --arch x86_64 %s' % (exe))
self.runCmd('image dump symtab %s' % (exe_basename))
diff --git a/lldb/test/API/functionalities/module_cache/universal/main.c b/lldb/test/API/functionalities/module_cache/universal/main.c
deleted file mode 100644
index 8e93a53a118ba..0000000000000
--- a/lldb/test/API/functionalities/module_cache/universal/main.c
+++ /dev/null
@@ -1,3 +0,0 @@
-int main(int argc, const char **argv) {
- return 0;
-}
diff --git a/lldb/test/API/functionalities/module_cache/universal/universal.yaml b/lldb/test/API/functionalities/module_cache/universal/universal.yaml
new file mode 100644
index 0000000000000..c36194901d74b
--- /dev/null
+++ b/lldb/test/API/functionalities/module_cache/universal/universal.yaml
@@ -0,0 +1,523 @@
+--- !fat-mach-o
+FatHeader:
+ magic: 0xCAFEBABE
+ nfat_arch: 2
+FatArchs:
+ - cputype: 0x1000007
+ cpusubtype: 0x3
+ offset: 0x4000
+ size: 16944
+ align: 14
+ - cputype: 0x100000C
+ cpusubtype: 0x0
+ offset: 0xC000
+ size: 17225
+ align: 14
+Slices:
+ - !mach-o
+ FileHeader:
+ magic: 0xFEEDFACF
+ cputype: 0x1000007
+ cpusubtype: 0x3
+ filetype: 0x2
+ ncmds: 14
+ sizeofcmds: 728
+ flags: 0x200085
+ reserved: 0x0
+ LoadCommands:
+ - cmd: LC_SEGMENT_64
+ cmdsize: 72
+ segname: __PAGEZERO
+ vmaddr: 0
+ vmsize: 4294967296
+ fileoff: 0
+ filesize: 0
+ maxprot: 0
+ initprot: 0
+ nsects: 0
+ flags: 0
+ - cmd: LC_SEGMENT_64
+ cmdsize: 232
+ segname: __TEXT
+ vmaddr: 4294967296
+ vmsize: 16384
+ fileoff: 0
+ filesize: 16384
+ maxprot: 5
+ initprot: 5
+ nsects: 2
+ flags: 0
+ Sections:
+ - sectname: __text
+ segname: __TEXT
+ addr: 0x100003FA0
+ size: 22
+ offset: 0x3FA0
+ align: 4
+ reloff: 0x0
+ nreloc: 0
+ flags: 0x80000400
+ reserved1: 0x0
+ reserved2: 0x0
+ reserved3: 0x0
+ content: 554889E5C745FC00000000897DF8488975F031C05DC3
+ - sectname: __unwind_info
+ segname: __TEXT
+ addr: 0x100003FB8
+ size: 72
+ offset: 0x3FB8
+ align: 2
+ reloff: 0x0
+ nreloc: 0
+ flags: 0x0
+ reserved1: 0x0
+ reserved2: 0x0
+ reserved3: 0x0
+ content: 010000001C000000000000001C000000000000001C00000002000000A03F00003400000034000000B73F00000000000034000000030000000C000100100001000000000000000001
+ - cmd: LC_SEGMENT_64
+ cmdsize: 72
+ segname: __LINKEDIT
+ vmaddr: 4294983680
+ vmsize: 16384
+ fileoff: 16384
+ filesize: 560
+ maxprot: 1
+ initprot: 1
+ nsects: 0
+ flags: 0
+ - cmd: LC_DYLD_INFO_ONLY
+ cmdsize: 48
+ rebase_off: 0
+ rebase_size: 0
+ bind_off: 0
+ bind_size: 0
+ weak_bind_off: 0
+ weak_bind_size: 0
+ lazy_bind_off: 0
+ lazy_bind_size: 0
+ export_off: 16384
+ export_size: 48
+ - cmd: LC_SYMTAB
+ cmdsize: 24
+ symoff: 16440
+ nsyms: 11
+ stroff: 16616
+ strsize: 328
+ - cmd: LC_DYSYMTAB
+ cmdsize: 80
+ ilocalsym: 0
+ nlocalsym: 8
+ iextdefsym: 8
+ nextdefsym: 2
+ iundefsym: 10
+ nundefsym: 1
+ tocoff: 0
+ ntoc: 0
+ modtaboff: 0
+ nmodtab: 0
+ extrefsymoff: 0
+ nextrefsyms: 0
+ indirectsymoff: 0
+ nindirectsyms: 0
+ extreloff: 0
+ nextrel: 0
+ locreloff: 0
+ nlocrel: 0
+ - cmd: LC_LOAD_DYLINKER
+ cmdsize: 32
+ name: 12
+ Content: '/usr/lib/dyld'
+ ZeroPadBytes: 7
+ - cmd: LC_UUID
+ cmdsize: 24
+ uuid: 90973A98-42A2-3ADD-B996-45BA6184EBB4
+ - cmd: LC_VERSION_MIN_MACOSX
+ cmdsize: 16
+ version: 657664
+ sdk: 786432
+ - cmd: LC_SOURCE_VERSION
+ cmdsize: 16
+ version: 0
+ - cmd: LC_MAIN
+ cmdsize: 24
+ entryoff: 16288
+ stacksize: 0
+ - cmd: LC_LOAD_DYLIB
+ cmdsize: 56
+ dylib:
+ name: 24
+ timestamp: 2
+ current_version: 85917696
+ compatibility_version: 65536
+ Content: '/usr/lib/libSystem.B.dylib'
+ ZeroPadBytes: 6
+ - cmd: LC_FUNCTION_STARTS
+ cmdsize: 16
+ dataoff: 16432
+ datasize: 8
+ - cmd: LC_DATA_IN_CODE
+ cmdsize: 16
+ dataoff: 16440
+ datasize: 0
+ LinkEditData:
+ ExportTrie:
+ TerminalSize: 0
+ NodeOffset: 0
+ Name: ''
+ Flags: 0x0
+ Address: 0x0
+ Other: 0x0
+ ImportName: ''
+ Children:
+ - TerminalSize: 0
+ NodeOffset: 5
+ Name: _
+ Flags: 0x0
+ Address: 0x0
+ Other: 0x0
+ ImportName: ''
+ Children:
+ - TerminalSize: 2
+ NodeOffset: 33
+ Name: _mh_execute_header
+ Flags: 0x0
+ Address: 0x0
+ Other: 0x0
+ ImportName: ''
+ - TerminalSize: 3
+ NodeOffset: 37
+ Name: main
+ Flags: 0x0
+ Address: 0x3FA0
+ Other: 0x0
+ ImportName: ''
+ NameList:
+ - n_strx: 45
+ n_type: 0x64
+ n_sect: 0
+ n_desc: 0
+ n_value: 0
+ - n_strx: 153
+ n_type: 0x64
+ n_sect: 0
+ n_desc: 0
+ n_value: 0
+ - n_strx: 160
+ n_type: 0x66
+ n_sect: 3
+ n_desc: 1
+ n_value: 1639771677
+ - n_strx: 1
+ n_type: 0x2E
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294983584
+ - n_strx: 316
+ n_type: 0x24
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294983584
+ - n_strx: 1
+ n_type: 0x24
+ n_sect: 0
+ n_desc: 0
+ n_value: 22
+ - n_strx: 1
+ n_type: 0x4E
+ n_sect: 1
+ n_desc: 0
+ n_value: 22
+ - n_strx: 1
+ n_type: 0x64
+ n_sect: 1
+ n_desc: 0
+ n_value: 0
+ - n_strx: 2
+ n_type: 0xF
+ n_sect: 1
+ n_desc: 16
+ n_value: 4294967296
+ - n_strx: 22
+ n_type: 0xF
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294983584
+ - n_strx: 28
+ n_type: 0x1
+ n_sect: 0
+ n_desc: 256
+ n_value: 0
+ StringTable:
+ - ' '
+ - __mh_execute_header
+ - _main
+ - dyld_stub_binder
+ - '/Users/gclayton/Documents/src/lldb/clean/llvm-project/lldb/test/API/functionalities/module_cache/universal/'
+ - main.c
+ - '/Users/gclayton/Documents/src/lldb/clean/Debug/lldb-test-build.noindex/functionalities/module_cache/universal/TestModuleCacheUniversal.test/testit.x86_64.o'
+ - _main
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+ - !mach-o
+ FileHeader:
+ magic: 0xFEEDFACF
+ cputype: 0x100000C
+ cpusubtype: 0x0
+ filetype: 0x2
+ ncmds: 15
+ sizeofcmds: 760
+ flags: 0x200085
+ reserved: 0x0
+ LoadCommands:
+ - cmd: LC_SEGMENT_64
+ cmdsize: 72
+ segname: __PAGEZERO
+ vmaddr: 0
+ vmsize: 4294967296
+ fileoff: 0
+ filesize: 0
+ maxprot: 0
+ initprot: 0
+ nsects: 0
+ flags: 0
+ - cmd: LC_SEGMENT_64
+ cmdsize: 232
+ segname: __TEXT
+ vmaddr: 4294967296
+ vmsize: 16384
+ fileoff: 0
+ filesize: 16384
+ maxprot: 5
+ initprot: 5
+ nsects: 2
+ flags: 0
+ Sections:
+ - sectname: __text
+ segname: __TEXT
+ addr: 0x100003F98
+ size: 32
+ offset: 0x3F98
+ align: 2
+ reloff: 0x0
+ nreloc: 0
+ flags: 0x80000400
+ reserved1: 0x0
+ reserved2: 0x0
+ reserved3: 0x0
+ content: FF4300D1E80300AA00008052FF0F00B9E80B00B9E10300F9FF430091C0035FD6
+ - sectname: __unwind_info
+ segname: __TEXT
+ addr: 0x100003FB8
+ size: 72
+ offset: 0x3FB8
+ align: 2
+ reloff: 0x0
+ nreloc: 0
+ flags: 0x0
+ reserved1: 0x0
+ reserved2: 0x0
+ reserved3: 0x0
+ content: 010000001C000000000000001C000000000000001C00000002000000983F00003400000034000000B93F00000000000034000000030000000C000100100001000000000000100002
+ - cmd: LC_SEGMENT_64
+ cmdsize: 72
+ segname: __LINKEDIT
+ vmaddr: 4294983680
+ vmsize: 16384
+ fileoff: 16384
+ filesize: 841
+ maxprot: 1
+ initprot: 1
+ nsects: 0
+ flags: 0
+ - cmd: LC_DYLD_INFO_ONLY
+ cmdsize: 48
+ rebase_off: 0
+ rebase_size: 0
+ bind_off: 0
+ bind_size: 0
+ weak_bind_off: 0
+ weak_bind_size: 0
+ lazy_bind_off: 0
+ lazy_bind_size: 0
+ export_off: 16384
+ export_size: 48
+ - cmd: LC_SYMTAB
+ cmdsize: 24
+ symoff: 16440
+ nsyms: 11
+ stroff: 16616
+ strsize: 328
+ - cmd: LC_DYSYMTAB
+ cmdsize: 80
+ ilocalsym: 0
+ nlocalsym: 8
+ iextdefsym: 8
+ nextdefsym: 2
+ iundefsym: 10
+ nundefsym: 1
+ tocoff: 0
+ ntoc: 0
+ modtaboff: 0
+ nmodtab: 0
+ extrefsymoff: 0
+ nextrefsyms: 0
+ indirectsymoff: 0
+ nindirectsyms: 0
+ extreloff: 0
+ nextrel: 0
+ locreloff: 0
+ nlocrel: 0
+ - cmd: LC_LOAD_DYLINKER
+ cmdsize: 32
+ name: 12
+ Content: '/usr/lib/dyld'
+ ZeroPadBytes: 7
+ - cmd: LC_UUID
+ cmdsize: 24
+ uuid: BF406023-7CD3-3A08-8C89-E917F6246752
+ - cmd: LC_BUILD_VERSION
+ cmdsize: 32
+ platform: 1
+ minos: 720896
+ sdk: 786432
+ ntools: 1
+ Tools:
+ - tool: 3
+ version: 46596096
+ - cmd: LC_SOURCE_VERSION
+ cmdsize: 16
+ version: 0
+ - cmd: LC_MAIN
+ cmdsize: 24
+ entryoff: 16280
+ stacksize: 0
+ - cmd: LC_LOAD_DYLIB
+ cmdsize: 56
+ dylib:
+ name: 24
+ timestamp: 2
+ current_version: 85917696
+ compatibility_version: 65536
+ Content: '/usr/lib/libSystem.B.dylib'
+ ZeroPadBytes: 6
+ - cmd: LC_FUNCTION_STARTS
+ cmdsize: 16
+ dataoff: 16432
+ datasize: 8
+ - cmd: LC_DATA_IN_CODE
+ cmdsize: 16
+ dataoff: 16440
+ datasize: 0
+ - cmd: LC_CODE_SIGNATURE
+ cmdsize: 16
+ dataoff: 16944
+ datasize: 281
+ LinkEditData:
+ ExportTrie:
+ TerminalSize: 0
+ NodeOffset: 0
+ Name: ''
+ Flags: 0x0
+ Address: 0x0
+ Other: 0x0
+ ImportName: ''
+ Children:
+ - TerminalSize: 0
+ NodeOffset: 5
+ Name: _
+ Flags: 0x0
+ Address: 0x0
+ Other: 0x0
+ ImportName: ''
+ Children:
+ - TerminalSize: 2
+ NodeOffset: 33
+ Name: _mh_execute_header
+ Flags: 0x0
+ Address: 0x0
+ Other: 0x0
+ ImportName: ''
+ - TerminalSize: 3
+ NodeOffset: 37
+ Name: main
+ Flags: 0x0
+ Address: 0x3F98
+ Other: 0x0
+ ImportName: ''
+ NameList:
+ - n_strx: 45
+ n_type: 0x64
+ n_sect: 0
+ n_desc: 0
+ n_value: 0
+ - n_strx: 153
+ n_type: 0x64
+ n_sect: 0
+ n_desc: 0
+ n_value: 0
+ - n_strx: 160
+ n_type: 0x66
+ n_sect: 0
+ n_desc: 1
+ n_value: 1639771677
+ - n_strx: 1
+ n_type: 0x2E
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294983576
+ - n_strx: 315
+ n_type: 0x24
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294983576
+ - n_strx: 1
+ n_type: 0x24
+ n_sect: 0
+ n_desc: 0
+ n_value: 32
+ - n_strx: 1
+ n_type: 0x4E
+ n_sect: 1
+ n_desc: 0
+ n_value: 32
+ - n_strx: 1
+ n_type: 0x64
+ n_sect: 1
+ n_desc: 0
+ n_value: 0
+ - n_strx: 2
+ n_type: 0xF
+ n_sect: 1
+ n_desc: 16
+ n_value: 4294967296
+ - n_strx: 22
+ n_type: 0xF
+ n_sect: 1
+ n_desc: 0
+ n_value: 4294983576
+ - n_strx: 28
+ n_type: 0x1
+ n_sect: 0
+ n_desc: 256
+ n_value: 0
+ StringTable:
+ - ' '
+ - __mh_execute_header
+ - _main
+ - dyld_stub_binder
+ - '/Users/gclayton/Documents/src/lldb/clean/llvm-project/lldb/test/API/functionalities/module_cache/universal/'
+ - main.c
+ - '/Users/gclayton/Documents/src/lldb/clean/Debug/lldb-test-build.noindex/functionalities/module_cache/universal/TestModuleCacheUniversal.test/testit.arm64.o'
+ - _main
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+ - ''
+...
More information about the lldb-commits
mailing list