freetype: support compiling with stage2 (-fno-stage1) #388

Merged
PiergiorgioZagaria merged 2 commits from main into main 2022-07-06 12:52:57 +00:00
PiergiorgioZagaria commented 2022-07-06 10:06:44 +00:00 (Migrated from github.com)
  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

Two things I wanted to notice are, utils_pkg (see https://github.com/hexops/mach/issues/180#issuecomment-1175993008) and test_option, @embedFile can't import from ../ so we need to use addOption in the build file. Also we can't @embedFile in build.zig because when running build.zig for the first time upstream/ hasn't been downloaded yet.

- [X] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right. Two things I wanted to notice are, utils_pkg (see https://github.com/hexops/mach/issues/180#issuecomment-1175993008) and test_option, `@embedFile` can't import from `../` so we need to use `addOption` in the build file. Also we can't `@embedFile` in build.zig because when running build.zig for the first time upstream/ hasn't been downloaded yet.
alichraghi (Migrated from github.com) approved these changes 2022-07-06 10:13:57 +00:00
iddev5 (Migrated from github.com) reviewed 2022-07-06 10:28:43 +00:00
@ -67,11 +67,16 @@ pub fn build(b: *std.build.Builder) !void {
main_tests.setBuildMode(mode);
iddev5 (Migrated from github.com) commented 2022-07-06 10:28:43 +00:00

You can just set exe.main_pkg_path which will solve the @embedFile issue

You can just set ``exe.main_pkg_path`` which will solve the @embedFile issue
iddev5 (Migrated from github.com) approved these changes 2022-07-06 10:28:55 +00:00
PiergiorgioZagaria (Migrated from github.com) reviewed 2022-07-06 11:16:43 +00:00
@ -67,11 +67,16 @@ pub fn build(b: *std.build.Builder) !void {
main_tests.setBuildMode(mode);
PiergiorgioZagaria (Migrated from github.com) commented 2022-07-06 11:16:43 +00:00

So I add main_tests.main_pkg_path = "upstream/assets/"; in build.zig and use @embedFile("FiraSans-Regular.ttf")?
It doesn't work so I don't think that's what you meant

So I add `main_tests.main_pkg_path = "upstream/assets/";` in build.zig and use `@embedFile("FiraSans-Regular.ttf")`? It doesn't work so I don't think that's what you meant
iddev5 (Migrated from github.com) reviewed 2022-07-06 11:27:04 +00:00
@ -67,11 +67,16 @@ pub fn build(b: *std.build.Builder) !void {
main_tests.setBuildMode(mode);
iddev5 (Migrated from github.com) commented 2022-07-06 11:27:04 +00:00

I meant setting main_pkg_path to thisDir() and then @embedFile("../upstream...")

I meant setting ``main_pkg_path`` to thisDir() and then @embedFile("../upstream...")
PiergiorgioZagaria (Migrated from github.com) reviewed 2022-07-06 11:29:54 +00:00
@ -67,11 +67,16 @@ pub fn build(b: *std.build.Builder) !void {
main_tests.setBuildMode(mode);
PiergiorgioZagaria (Migrated from github.com) commented 2022-07-06 11:29:54 +00:00

Ah yeah, that was it thanks

Ah yeah, that was it thanks
emidoots (Migrated from github.com) approved these changes 2022-07-06 12:52:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach!388
No description provided.