macos: need to link to libstdc++

This commit is contained in:
Mitchell Hashimoto
2023-02-14 14:21:26 -08:00
parent d2dd3df86a
commit d2d21801d8
2 changed files with 6 additions and 0 deletions

View File

@ -462,12 +462,15 @@ fn addDeps(
// Other dependencies, we may dynamically link // Other dependencies, we may dynamically link
if (static) { if (static) {
const zlib_step = try zlib.link(b, step); const zlib_step = try zlib.link(b, step);
try static_libs.append(.{ .generated = &zlib_step.output_path_source });
const libpng_step = try libpng.link(b, step, .{ const libpng_step = try libpng.link(b, step, .{
.zlib = .{ .zlib = .{
.step = zlib_step, .step = zlib_step,
.include = &zlib.include_paths, .include = &zlib.include_paths,
}, },
}); });
try static_libs.append(.{ .generated = &libpng_step.output_path_source });
// Freetype // Freetype
const freetype_step = try freetype.link(b, step, .{ const freetype_step = try freetype.link(b, step, .{
@ -483,6 +486,7 @@ fn addDeps(
.include = &zlib.include_paths, .include = &zlib.include_paths,
}, },
}); });
try static_libs.append(.{ .generated = &freetype_step.output_path_source });
// Harfbuzz // Harfbuzz
const harfbuzz_step = try harfbuzz.link(b, step, .{ const harfbuzz_step = try harfbuzz.link(b, step, .{

View File

@ -292,6 +292,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MARKETING_VERSION = 0.1; MARKETING_VERSION = 0.1;
"OTHER_LDFLAGS[arch=*]" = "-lstdc++";
PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.Ghostty; PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.Ghostty;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;
@ -323,6 +324,7 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MARKETING_VERSION = 0.1; MARKETING_VERSION = 0.1;
"OTHER_LDFLAGS[arch=*]" = "-lstdc++";
PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.Ghostty; PRODUCT_BUNDLE_IDENTIFIER = com.mitchellh.Ghostty;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_EMIT_LOC_STRINGS = YES;