Devtools darwin (#46910)
* stacks: add a stack for devtools on darwin After getting this whole mess building on darwin, let's keep it that way, and maybe make it so we have some non-ML darwin binaries in spack as well. * reuse: false for devtools * dtc: fix darwin dylib name and id On mac the convention is `lib<name>.<num>.dylib`, while the makefile creates a num suffixed one by default. The id in the file is also a local name rather than rewritten to the full path, this fixes both problems. * node-js: make whereis more deterministic * relocation(darwin): catch Mach-O load failure The MachO library can throw an exception rather than return no headers, this happened in an elf file in the test data of go-bootstrap. Trying catching the exception and moving on for now. May also need to look into why we're trying to rewrite an elf file. * qemu: add darwin flags to clear out warnings There's a build failure for qemu in CI, but it's invisible because of the immense mass of warning output. Explicitly specify the target macos version and remove the extraneous unknown-warning-option flag. * dtc: libyaml is also a link dependency libyaml is required at runtime to run the dtc binary, lack of it caused the ci for qemu to fail when the library wasn't found.
This commit is contained in:
@@ -283,7 +283,11 @@ def modify_macho_object(cur_path, rpaths, deps, idpath, paths_to_paths):
|
||||
|
||||
def macholib_get_paths(cur_path):
|
||||
"""Get rpaths, dependent libraries, and library id of mach-o objects."""
|
||||
headers = macholib.MachO.MachO(cur_path).headers
|
||||
headers = []
|
||||
try:
|
||||
headers = macholib.MachO.MachO(cur_path).headers
|
||||
except ValueError:
|
||||
pass
|
||||
if not headers:
|
||||
tty.warn("Failed to read Mach-O headers: {0}".format(cur_path))
|
||||
commands = []
|
||||
|
Reference in New Issue
Block a user