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

Add YueScript as an additional scripting language #2743

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed YueScript build.
  • Loading branch information
pigpigyyy committed Jan 21, 2025
commit c213639b925f383482b6db122caab9baf6869942
2 changes: 1 addition & 1 deletion build/baremetalpi/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ get_filename_component(ARM_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
# Now squirrel works.
# Ideally should use the CFLAGS defined in circle build files, not hardwire them here too.
# For RPI2
#set(CMAKE_C_FLAGS " -DMINIZ_NO_TIME -DTIC_BUILD_WITH_FENNEL -DTIC_BUILD_WITH_MOON -DTIC_BUILD_WITH_JS -DTIC_BUILD_WITH_WREN -DTIC_BUILD_WITH_LUA -DLUA_32BITS -std=c99 -march=armv7-a+neon-vfpv4 -D AARCH=32 -D __circle__ -D BAREMETALPI --specs=nosys.specs -O3 -mabi=aapcs -marm -mfloat-abi=hard -mfpu=neon-vfpv4 -D__DYNAMIC_REENT__")
#set(CMAKE_C_FLAGS " -DMINIZ_NO_TIME -DTIC_BUILD_WITH_FENNEL -DTIC_BUILD_WITH_MOON -DTIC_BUILD_WITH_YUE -DTIC_BUILD_WITH_JS -DTIC_BUILD_WITH_WREN -DTIC_BUILD_WITH_LUA -DLUA_32BITS -std=c99 -march=armv7-a+neon-vfpv4 -D AARCH=32 -D __circle__ -D BAREMETALPI --specs=nosys.specs -O3 -mabi=aapcs -marm -mfloat-abi=hard -mfpu=neon-vfpv4 -D__DYNAMIC_REENT__")
# For RPI3
# investigate -funsafe-math-optimizations and -march=armv8-a+crc -mcpu=cortex-a53
set(CMAKE_C_FLAGS " -DMINIZ_NO_TIME -DLUA_32BITS -std=c99 -march=armv8-a -D AARCH=32 -mtune=cortex-a53 -D __circle__ -D BAREMETALPI --specs=nosys.specs -O3 -marm -mfloat-abi=hard -mfpu=neon-fp-armv8 -funsafe-math-optimizations -D__DYNAMIC_REENT__")
Expand Down
2 changes: 1 addition & 1 deletion cmake/yue.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if(BUILD_WITH_YUE)
endif()

if(APPLE)
target_compile_definitions(yuescript PRIVATE -Wno-deprecated-declarations)
target_compile_options(yuescript PRIVATE -Wno-deprecated-declarations)
endif()

endif()
5 changes: 4 additions & 1 deletion src/api/yue.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extern "C" {
#include "core/core.h"
#include "luaapi.h"
}

#include "yuescript/yue_compiler.h"

static inline bool isalnum_(char c)
Expand Down Expand Up @@ -159,7 +162,7 @@ static const u8 MarkRom[] =
#include "../build/assets/yuemark.tic.dat"
};

TIC_EXPORT const tic_script EXPORT_SCRIPT(Yue) = {
extern "C" TIC_EXPORT const tic_script EXPORT_SCRIPT(Yue) = {
21, // id
"yue", // name
".yue", // fileExtension
Expand Down