Skip to content

Commit

Permalink
fxing linux ci after updating tinycc (#553)
Browse files Browse the repository at this point in the history
* adding C to macos CI and updating tcc commit sha

* adding branch to ci triggers

* modifying md5 hash for tinycc

* typo in MD5

* replace TCC_RELOCATE_AUTO in the code

* update code according to new signature of tcc_relocate function

* remove branch name from macos ci

* remove branch from linux ci

* remove branch from windows ci

* remove c from macos ci

* Update metacall-environment.sh

---------

Co-authored-by: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com>
  • Loading branch information
Bishoywadea and viferga authored Feb 28, 2025
1 parent 9bb0a6c commit 95a2663
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cmake/InstallLibTCC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ else()
endif()

set(LIBTCC_TARGET libtcc-depends)
set(LIBTCC_COMMIT_SHA "afc1362")
set(LIBTCC_COMMIT_SHA "6ec4a10")
if(PROJECT_OS_FAMILY STREQUAL macos)
# TODO: --disable-static is not working on MacOS, this should be reported or further investigated, remove this when it is solved
set(LIBTTC_LIBRARY_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}tcc${CMAKE_STATIC_LIBRARY_SUFFIX}")
Expand All @@ -146,7 +146,7 @@ set(LIBTTC_RUNTIME_FILES
ExternalProject_Add(${LIBTCC_TARGET}
DOWNLOAD_NAME tinycc.tar.gz
URL https://github.com/metacall/tinycc/archive/${LIBTCC_COMMIT_SHA}.tar.gz
URL_MD5 5582b17ee5848aeec28bee13773843f7
URL_MD5 1d25d1a07a39c6d6671b7221d5286dc1
CONFIGURE_COMMAND ${LIBTCC_CONFIGURE}
BUILD_COMMAND ${LIBTCC_BUILD}
BUILD_IN_SOURCE true
Expand Down
4 changes: 2 additions & 2 deletions source/loaders/c_loader/source/c_loader_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ loader_handle c_loader_impl_load_from_file(loader_impl impl, const loader_path p
}
}

if (tcc_relocate(c_handle->state, TCC_RELOCATE_AUTO) == -1)
if (tcc_relocate(c_handle->state) == -1)
{
log_write("metacall", LOG_LEVEL_ERROR, "TCC failed to relocate");
goto error;
Expand Down Expand Up @@ -1256,7 +1256,7 @@ loader_handle c_loader_impl_load_from_memory(loader_impl impl, const loader_name
goto error;
}

if (tcc_relocate(c_handle->state, TCC_RELOCATE_AUTO) == -1)
if (tcc_relocate(c_handle->state) == -1)
{
log_write("metacall", LOG_LEVEL_ERROR, "TCC failed to relocate");
goto error;
Expand Down
4 changes: 2 additions & 2 deletions tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,10 @@ sub_java(){
# C
sub_c(){
echo "configure c"
cd $ROOT_DIR
LLVM_VERSION_STRING=14

if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then
LLVM_VERSION_STRING=14

if [ "${LINUX_DISTRO}" = "debian" ]; then
UBUNTU_CODENAME=""
CODENAME_FROM_ARGUMENTS=""
Expand Down

0 comments on commit 95a2663

Please sign in to comment.