Skip to content

Commit

Permalink
Workflow and Zig Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shabinder committed Aug 13, 2024
1 parent 0d1c8fa commit fb961b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:

- name: Build native libraries
run: |
if [[ "$(uname)" == "Darwin" ]]; then
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.B.tbd /opt/homebrew/Cellar/zig/0.13.0/lib/zig/libc/darwin/libSystem.tbd
fi
cd zipline
zig build
Expand Down Expand Up @@ -97,6 +100,9 @@ jobs:

- name: Build native libraries
run: |
if [[ "$(uname)" == "Darwin" ]]; then
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.B.tbd /opt/homebrew/Cellar/zig/0.13.0/lib/zig/libc/darwin/libSystem.tbd
fi
cd zipline
zig build
Expand Down
2 changes: 1 addition & 1 deletion zipline/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn getOutputDir(target: std.Target.Query, allocator: std.mem.Allocator) ![]const
}

fn listFilesWithExtension(ext: []const u8, allocator: std.mem.Allocator, dir_path: []const u8, recursive: bool) ![]const []const u8 {
var dir = try std.fs.cwd().openDir(dir_path, .{});
var dir = try std.fs.cwd().openDir(dir_path, .{ .iterate = true });
defer dir.close();

var files = std.ArrayList([]const u8).init(allocator);
Expand Down
4 changes: 4 additions & 0 deletions zipline/src/androidMain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)

file(GLOB_RECURSE sources "../../native/*.c" "../../native/*.cpp")
file(GLOB_RECURSE pthread_sources "../../native/winpthreads/*.c")

# Remove pthread sources from main sources list.
list(REMOVE_ITEM sources ${pthread_sources})

add_library(quickjs SHARED ${sources})

Expand Down

0 comments on commit fb961b3

Please sign in to comment.