Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build MetaCall with C support for macOS #445

Draft
wants to merge 35 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fb859e9
Enable Cobol [skip ci]
ahmedihabb2 Jun 6, 2023
f53a146
SSH intro runner [skip ci]
ahmedihabb2 Jun 8, 2023
3c10934
Fix cobol paths [skip ci]
ahmedihabb2 Jun 8, 2023
983647d
Fix cobol paths [skip ci]
ahmedihabb2 Jun 8, 2023
78d165c
SSH to try commands [skip ci]
ahmedihabb2 Jun 8, 2023
eb1cf48
Enable C [skip ci]
ahmedihabb2 Jun 8, 2023
b6b7fb8
Debugging [skip ci]
ahmedihabb2 Jun 8, 2023
56808bb
Fix tcc paths [skip ci]
ahmedihabb2 Jun 8, 2023
c987122
Fix typo
ahmedihabb2 Jun 8, 2023
559970a
more debugging [skip ci]
ahmedihabb2 Jun 8, 2023
344b903
Add libclang paths [skip ci]
ahmedihabb2 Jun 8, 2023
4b84e37
SSH intro runner [skip ci]
ahmedihabb2 Jun 8, 2023
826a318
Fix cobol paths [skip ci]
ahmedihabb2 Jun 8, 2023
72eb50c
SSH to try commands [skip ci]
ahmedihabb2 Jun 8, 2023
3c861d5
Enable C [skip ci]
ahmedihabb2 Jun 8, 2023
833a97a
Debugging [skip ci]
ahmedihabb2 Jun 8, 2023
f509251
Fix tcc paths [skip ci]
ahmedihabb2 Jun 8, 2023
211149b
Fix typo
ahmedihabb2 Jun 8, 2023
c0b22a5
more debugging [skip ci]
ahmedihabb2 Jun 8, 2023
34c8b22
Add libclang paths [skip ci]
ahmedihabb2 Jun 8, 2023
5830c69
Merge branch 'build-with-c' of https://github.com/ahmedihabb2/core in…
ahmedihabb2 Jun 9, 2023
f1ce6e4
Remove Tcc installation [skip ci]
ahmedihabb2 Jun 15, 2023
532f06a
fix Tcc installation [skip ci]
ahmedihabb2 Jun 15, 2023
fe50ed5
SSH intro runner [skip ci]
ahmedihabb2 Jun 8, 2023
0998166
Fix cobol paths [skip ci]
ahmedihabb2 Jun 8, 2023
11747f2
SSH to try commands [skip ci]
ahmedihabb2 Jun 8, 2023
7bba52e
Enable C [skip ci]
ahmedihabb2 Jun 8, 2023
bd2c2bc
Debugging [skip ci]
ahmedihabb2 Jun 8, 2023
d6825a2
Fix tcc paths [skip ci]
ahmedihabb2 Jun 8, 2023
0263c05
Fix typo
ahmedihabb2 Jun 8, 2023
e07deb3
more debugging [skip ci]
ahmedihabb2 Jun 8, 2023
d222b28
Add libclang paths [skip ci]
ahmedihabb2 Jun 8, 2023
84b05ff
Remove Tcc installation [skip ci]
ahmedihabb2 Jun 15, 2023
7da6cf9
fix Tcc installation [skip ci]
ahmedihabb2 Jun 15, 2023
e9e6beb
Merge branch 'build-with-c' of https://github.com/ahmedihabb2/core in…
ahmedihabb2 Jun 15, 2023
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: 2 additions & 2 deletions .github/workflows/macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ jobs:
- name: Set up the environment
run: sh ./tools/metacall-environment.sh $METACALL_INSTALL_OPTIONS
env:
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol #netcore5 c rust rapidjson funchook swig pack # clangformat v8rep51 coverage
METACALL_INSTALL_OPTIONS: base python nodejs typescript java ruby wasm rpc file cobol c #netcore5 rust rapidjson funchook swig pack # clangformat v8rep51 coverage

- name: Configure
run: |
cd build
bash ../tools/metacall-configure.sh $METACALL_CONFIGURE_OPTIONS
env:
METACALL_CONFIGURE_OPTIONS: ${{ matrix.buildtype }} scripts ports tests sanitizer python nodejs typescript java ruby wasm rpc file cobol # netcore5 c rust examples install pack benchmarks # v8 coverage
METACALL_CONFIGURE_OPTIONS: ${{ matrix.buildtype }} scripts ports tests sanitizer python nodejs typescript java ruby wasm rpc file cobol c # netcore5 rust examples install pack benchmarks # v8 coverage

- name: Build
working-directory: ./build
Expand Down
4 changes: 2 additions & 2 deletions cmake/InstallLibTCC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else()
endif()

# Configure
if(PROJECT_OS_FAMILY STREQUAL unix)
if(PROJECT_OS_FAMILY STREQUAL unix OR PROJECT_OS_FAMILY STREQUAL macos)
if(OPTION_BUILD_MUSL)
set(LIBTCC_CONFIGURE ./configure --prefix=${LIBTCC_INSTALL_PREFIX} ${LIBTCC_DEBUG} --disable-static --config-musl)
else()
Expand All @@ -62,7 +62,7 @@ ProcessorCount(N)
# Build
if(PROJECT_OS_BSD)
set(LIBTCC_BUILD gmake -j${N})
elseif(PROJECT_OS_FAMILY STREQUAL unix)
elseif(PROJECT_OS_FAMILY STREQUAL unix OR PROJECT_OS_FAMILY STREQUAL macos)
set(LIBTCC_BUILD make -j${N})
elseif(PROJECT_OS_FAMILY STREQUAL win32)
if(PROJECT_OS_NAME STREQUAL MinGW)
Expand Down
11 changes: 11 additions & 0 deletions tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,17 @@ sub_c(){
$SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing tcc
$SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.14/main clang-libs=11.1.0-r1 clang-dev=11.1.0-r1
fi
elif [ "${OPERATIVE_SYSTEM}" = "Darwin" ]; then
brew install libffi
brew install llvm@11
brew link llvm@11 --force --overwrite
mkdir -p build
CMAKE_CONFIG_PATH="$ROOT_DIR/build/CMakeConfig.txt"
TCC_PREFIX=$(brew --prefix tcc)
LIBC_PREFIX=$(brew --prefix llvm@11)
echo "-DLibClang_INCLUDE_DIR=${LIBC_PREFIX}/include/clang-c" >> $CMAKE_CONFIG_PATH
echo "-DLibClang_LIBRARY=${LIBC_PREFIX}/lib/libclang.dylib" >> $CMAKE_CONFIG_PATH

fi
}

Expand Down