Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .clusterfuzzlite/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ cd build
cmake ../
make uvwasi_a

LIBUV_A="$(find . -name 'libuv_a.a' -o -name 'libuv.a' | head -n1)"

$CC $CFLAGS $LIB_FUZZING_ENGINE ../.clusterfuzzlite/fuzz_normalize_path.c \
-o $OUT/fuzz_normalize_path \
./libuvwasi.a _deps/libuv-build/libuv_a.a \
./libuvwasi.a "$LIBUV_A" \
-I$SRC/uvwasi/include -I$PWD/_deps/libuv-src/include/
6 changes: 3 additions & 3 deletions .github/workflows/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on: [push, pull_request]
jobs:
build-android:
runs-on: ubuntu-latest
container: reactnativecommunity/react-native-android:7.0
container: reactnativecommunity/react-native-android:v13.0
steps:
- uses: actions/checkout@v5
- name: Envinfo
run: npx envinfo
- name: Build android arm64
# see build options you can use in https://developer.android.com/ndk/guides/cmake
# quickly debug on your local docker
# docker run -it -v $PWD:/pwd reactnativecommunity/react-native-android:7.0 bash
# docker run -it -v $PWD:/pwd reactnativecommunity/react-native-android:v13.0 bash
run: |
mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_GRADLE/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 ..
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 ..
cmake --build .
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ project (
LANGUAGES C
)

option(UVWASI_BUILD_SHARED "Build shared lib" ON)

# Point CMake at any custom modules we may ship
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

# This can be a commit hash or tag
set(LIBUV_VERSION v1.44.2)
set(LIBUV_VERSION v1.52.1)

include(CMakeDependentOption)
cmake_dependent_option(BUILD_TESTING
Expand Down Expand Up @@ -112,14 +114,16 @@ else()
endif()

## Shared library target.
add_library(uvwasi SHARED ${uvwasi_sources})
target_compile_definitions(uvwasi PRIVATE ${uvwasi_defines})
target_compile_options(uvwasi PRIVATE ${uvwasi_cflags})
target_include_directories(uvwasi PRIVATE ${PROJECT_SOURCE_DIR}/include)
if(CODE_COVERAGE)
target_link_libraries(uvwasi PUBLIC ${LIBUV_LIBRARIES} coverage_config)
else()
target_link_libraries(uvwasi PRIVATE ${LIBUV_LIBRARIES})
if(UVWASI_BUILD_SHARED)
add_library(uvwasi SHARED ${uvwasi_sources})
target_compile_definitions(uvwasi PRIVATE ${uvwasi_defines})
target_compile_options(uvwasi PRIVATE ${uvwasi_cflags})
target_include_directories(uvwasi PRIVATE ${PROJECT_SOURCE_DIR}/include)
if(CODE_COVERAGE)
target_link_libraries(uvwasi PUBLIC ${LIBUV_LIBRARIES} coverage_config)
else()
target_link_libraries(uvwasi PRIVATE ${LIBUV_LIBRARIES})
endif()
endif()


Expand Down
Loading