File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -631,13 +631,13 @@ importer::getNormalInvocationArguments(
631631 });
632632 }
633633
634- // To support -apple-none triples, which are non-Darwin, we need to #define
635- // a few things that the Apple SDKs expect.
634+ // To support -apple-none, -apple-none-macho, -unknown-none-wasm triples.
636635 if (triple.getVendor () == llvm::Triple::VendorType::Apple) {
637- invocationArgStrs.insert (invocationArgStrs.end (),
638- {" -D__APPLE__" , " -D__MACH__" });
636+ invocationArgStrs.insert (invocationArgStrs.end (), {" -D__APPLE__" });
637+ }
638+ if (triple.isOSBinFormatMachO ()) {
639+ invocationArgStrs.insert (invocationArgStrs.end (), {" -D__MACH__" });
639640 }
640-
641641 if (triple.isOSBinFormatWasm ()) {
642642 invocationArgStrs.insert (invocationArgStrs.end (), {" -D__wasi__" });
643643 }
You can’t perform that action at this time.
0 commit comments