1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Merge branch 'refs/heads/testnet' into accelerator

This commit is contained in:
SpyCheese 2024-06-10 13:23:47 +03:00
commit f91ed6cc31
18 changed files with 336 additions and 129 deletions

View file

@ -479,10 +479,17 @@ if (NOT CMAKE_CROSSCOMPILING OR USE_EMSCRIPTEN)
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_DEST_FIF}
)
set(ARG_DEST_CPP "${ARG_DEST}.cpp")
if (WIN32)
set(ARG_LIB_DIR "fift/lib@smartcont")
else()
set(ARG_LIB_DIR "fift/lib:smartcont")
endif()
add_custom_command(
COMMENT "Generate ${ARG_DEST_CPP}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND fift -Ifift/lib:smartcont -s asm-to-cpp.fif ${ARG_DEST_FIF} ${ARG_DEST_CPP} ${ARG_NAME}
COMMAND fift -I${ARG_LIB_DIR} -s asm-to-cpp.fif ${ARG_DEST_FIF} ${ARG_DEST_CPP} ${ARG_NAME}
MAIN_DEPENDENCY ${ARG_SOURCE}
DEPENDS fift ${ARG_DEST_FIF} smartcont/asm-to-cpp.fif fift/lib/Asm.fif
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_DEST_CPP}

View file

@ -814,11 +814,16 @@ void usage(const char* progname) {
void parse_include_path_set(std::string include_path_set, std::vector<std::string>& res) {
td::Parser parser(include_path_set);
while (!parser.empty()) {
auto path = parser.read_till_nofail(':');
#if TD_WINDOWS
auto path_separator = '@';
#else
auto path_separator = ':';
#endif
auto path = parser.read_till_nofail(path_separator);
if (!path.empty()) {
res.push_back(path.str());
}
parser.skip_nofail(':');
parser.skip_nofail(path_separator);
}
}

View file

@ -62,7 +62,7 @@ void usage(const char* progname) {
<< " [-i] [-n] [-I <source-include-path>] {-L <library-fif-file>} <source-file1-fif> <source-file2-fif> ...\n";
std::cerr << "\t-n\tDo not preload standard preamble file `Fift.fif`\n"
"\t-i\tForce interactive mode even if explicit source file names are indicated\n"
"\t-I<source-search-path>\tSets colon-separated library source include path. If not indicated, "
"\t-I<source-search-path>\tSets colon-separated (unix) or at-separated (windows) library source include path. If not indicated, "
"$FIFTPATH is used instead.\n"
"\t-L<library-fif-file>\tPre-loads a library source file\n"
"\t-d<ton-db-path>\tUse a ton database\n"
@ -75,11 +75,16 @@ void usage(const char* progname) {
void parse_include_path_set(std::string include_path_set, std::vector<std::string>& res) {
td::Parser parser(include_path_set);
while (!parser.empty()) {
auto path = parser.read_till_nofail(':');
#if TD_WINDOWS
auto path_separator = '@';
#else
auto path_separator = ':';
#endif
auto path = parser.read_till_nofail(path_separator);
if (!path.empty()) {
res.push_back(path.str());
}
parser.skip_nofail(':');
parser.skip_nofail(path_separator);
}
}