diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cf7214e3a..a855d18d65 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_SOURCE_DIR}/cmake/UserOverride.cmake) # We don't execute this if we have a tarball -if (LPYTHON_BUILD_ALL) +if (LCOMPILERS_BUILD_ALL) execute_process(COMMAND "build0.sh") endif() @@ -24,11 +24,11 @@ if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR endif () if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(LPYTHON_CXX_NO_RTTI_FLAG "-fno-rtti") + set(LCOMPILERS_CXX_NO_RTTI_FLAG "-fno-rtti") elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang) - set(LPYTHON_CXX_NO_RTTI_FLAG "-fno-rtti") + set(LCOMPILERS_CXX_NO_RTTI_FLAG "-fno-rtti") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(LPYTHON_CXX_NO_RTTI_FLAG "/GR-") + set(LCOMPILERS_CXX_NO_RTTI_FLAG "/GR-") endif () @@ -70,8 +70,8 @@ endif() set(WITH_LCOMPILERS_ASSERT ${WITH_LCOMPILERS_ASSERT_DEFAULT} CACHE BOOL "Enable LCOMPILERS_ASSERT macro") -# LPYTHON_STATIC_BIN -set(LPYTHON_STATIC_BIN no CACHE BOOL "Build LPython as a static binary") +# LCOMPILERS_STATIC_BIN +set(LCOMPILERS_STATIC_BIN no CACHE BOOL "Build LPython as a static binary") # WITH_LCOMPILERS_BINARY_MODFILES set(WITH_LCOMPILERS_BINARY_MODFILES YES @@ -89,7 +89,7 @@ set(WITH_LLVM no CACHE BOOL "Build with LLVM support") set(WITH_TARGET_AARCH64 no CACHE BOOL "Enable target AARCH64") set(WITH_TARGET_X86 no CACHE BOOL "Enable target X86") if (WITH_LLVM) - set(LPYTHON_LLVM_COMPONENTS core support mcjit orcjit native asmparser asmprinter) + set(LCOMPILERS_LLVM_COMPONENTS core support mcjit orcjit native asmparser asmprinter) find_package(LLVM REQUIRED) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") @@ -108,7 +108,7 @@ if (WITH_LLVM) message(FATAL_ERROR "The selected LLVM library doesn't have support for AArch64 targets") endif() - list(APPEND LPYTHON_LLVM_COMPONENTS aarch64info aarch64utils aarch64desc aarch64asmparser aarch64codegen aarch64disassembler) + list(APPEND LCOMPILERS_LLVM_COMPONENTS aarch64info aarch64utils aarch64desc aarch64asmparser aarch64codegen aarch64disassembler) add_definitions("-DHAVE_TARGET_AARCH64=1") endif() @@ -117,12 +117,12 @@ if (WITH_LLVM) message(FATAL_ERROR "The selected LLVM library doesn't have support for X86 targets") endif() - list(APPEND LPYTHON_LLVM_COMPONENTS x86info x86desc x86codegen x86asmparser x86disassembler) + list(APPEND LCOMPILERS_LLVM_COMPONENTS x86info x86desc x86codegen x86asmparser x86disassembler) add_definitions("-DHAVE_TARGET_X86=1") endif() - llvm_map_components_to_libnames(llvm_libs ${LPYTHON_LLVM_COMPONENTS}) - unset(LPYTHON_LLVM_COMPONENTS) + llvm_map_components_to_libnames(llvm_libs ${LCOMPILERS_LLVM_COMPONENTS}) + unset(LCOMPILERS_LLVM_COMPONENTS) add_library(p::llvm INTERFACE IMPORTED) set_property(TARGET p::llvm PROPERTY INTERFACE_INCLUDE_DIRECTORIES @@ -132,7 +132,7 @@ if (WITH_LLVM) #set_property(TARGET p::llvm PROPERTY INTERFACE_COMPILE_OPTIONS # ${LLVM_DEFINITIONS}) set_property(TARGET p::llvm PROPERTY INTERFACE_COMPILE_OPTIONS - $<$:${LPYTHON_CXX_NO_RTTI_FLAG}>) + $<$:${LCOMPILERS_CXX_NO_RTTI_FLAG}>) set_property(TARGET p::llvm PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_libs}) if (MSVC) @@ -251,7 +251,7 @@ else () endif () message("Installation prefix: ${CMAKE_INSTALL_PREFIX}") message("WITH_LCOMPILERS_ASSERT: ${WITH_LCOMPILERS_ASSERT}") -message("LPYTHON_STATIC_BIN: ${LPYTHON_STATIC_BIN}") +message("LCOMPILERS_STATIC_BIN: ${LCOMPILERS_STATIC_BIN}") message("WITH_STACKTRACE: ${WITH_STACKTRACE}") message("WITH_UNWIND: ${WITH_UNWIND}") message("WITH_BFD: ${WITH_BFD}") diff --git a/build1.sh b/build1.sh index b73689fd16..418222435a 100755 --- a/build1.sh +++ b/build1.sh @@ -6,7 +6,7 @@ set -x cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DWITH_LLVM=yes \ - -DLPYTHON_BUILD_ALL=yes \ + -DLCOMPILERS_BUILD_ALL=yes \ -DWITH_STACKTRACE=yes \ -DWITH_LCOMPILERS_BINARY_MODFILES=no \ -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH_LPYTHON;$CONDA_PREFIX" \ diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt index 7262a66c50..8550a77d5c 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt @@ -1,7 +1,7 @@ add_executable(lpython lpython.cpp) target_include_directories(lpython PRIVATE "tpl") target_link_libraries(lpython lpython_lib) -if (LPYTHON_STATIC_BIN) +if (LCOMPILERS_STATIC_BIN) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # Link statically on Linux with gcc or clang if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR diff --git a/src/lpython/parser/parser.h b/src/lpython/parser/parser.h index 3992bdd4cf..0c68e2c064 100644 --- a/src/lpython/parser/parser.h +++ b/src/lpython/parser/parser.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_PARSER_PARSER_H -#define LPYTHON_PARSER_PARSER_H +#ifndef LCOMPILERS_PARSER_PARSER_H +#define LCOMPILERS_PARSER_PARSER_H #include #include diff --git a/src/lpython/parser/parser_exception.h b/src/lpython/parser/parser_exception.h index 68c2fdfba9..abc30c1f04 100644 --- a/src/lpython/parser/parser_exception.h +++ b/src/lpython/parser/parser_exception.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_PARSER_PARSER_EXCEPTION_H -#define LPYTHON_PARSER_PARSER_EXCEPTION_H +#ifndef LCOMPILERS_PARSER_PARSER_EXCEPTION_H +#define LCOMPILERS_PARSER_PARSER_EXCEPTION_H #include #include @@ -46,4 +46,4 @@ namespace parser_local { } -#endif // LPYTHON_PARSER_PARSER_EXCEPTION_H +#endif // LCOMPILERS_PARSER_PARSER_EXCEPTION_H diff --git a/src/lpython/parser/parser_stype.h b/src/lpython/parser/parser_stype.h index e4591ed9eb..a491dcd5c3 100644 --- a/src/lpython/parser/parser_stype.h +++ b/src/lpython/parser/parser_stype.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_PARSER_STYPE_H -#define LPYTHON_PARSER_STYPE_H +#ifndef LCOMPILERS_PARSER_STYPE_H +#define LCOMPILERS_PARSER_STYPE_H #include #include @@ -62,4 +62,4 @@ typedef struct LCompilers::Location YYLTYPE; #define YYLTYPE_IS_TRIVIAL 0 -#endif // LPYTHON_PARSER_STYPE_H +#endif // LCOMPILERS_PARSER_STYPE_H diff --git a/src/lpython/parser/semantics.h b/src/lpython/parser/semantics.h index dfa4cd86c0..246856d80b 100644 --- a/src/lpython/parser/semantics.h +++ b/src/lpython/parser/semantics.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_PARSER_SEMANTICS_H -#define LPYTHON_PARSER_SEMANTICS_H +#ifndef LCOMPILERS_PARSER_SEMANTICS_H +#define LCOMPILERS_PARSER_SEMANTICS_H /* This header file contains parser semantics: how the AST classes get diff --git a/src/lpython/parser/tokenizer.h b/src/lpython/parser/tokenizer.h index b0ce51fb44..c674132de6 100644 --- a/src/lpython/parser/tokenizer.h +++ b/src/lpython/parser/tokenizer.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_SRC_PARSER_TOKENIZER_H -#define LPYTHON_SRC_PARSER_TOKENIZER_H +#ifndef LCOMPILERS_SRC_PARSER_TOKENIZER_H +#define LCOMPILERS_SRC_PARSER_TOKENIZER_H #include #include @@ -88,4 +88,4 @@ std::string pickle_token(int token, const YYSTYPE &yystype); } // namespace LCompilers -#endif // LPYTHON_SRC_PARSER_TOKENIZER_H +#endif // LCOMPILERS_SRC_PARSER_TOKENIZER_H diff --git a/src/lpython/semantics/python_attribute_eval.h b/src/lpython/semantics/python_attribute_eval.h index b3cdf88df7..ddd673d77f 100644 --- a/src/lpython/semantics/python_attribute_eval.h +++ b/src/lpython/semantics/python_attribute_eval.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_ATTRIBUTE_EVAL_H -#define LPYTHON_ATTRIBUTE_EVAL_H +#ifndef LCOMPILERS_ATTRIBUTE_EVAL_H +#define LCOMPILERS_ATTRIBUTE_EVAL_H #include @@ -313,4 +313,4 @@ struct AttributeHandler { } // namespace LCompilers -#endif /* LPYTHON_ATTRIBUTE_EVAL_H */ +#endif /* LCOMPILERS_ATTRIBUTE_EVAL_H */ diff --git a/src/lpython/semantics/python_comptime_eval.h b/src/lpython/semantics/python_comptime_eval.h index d8fc225905..fc9bacda7f 100644 --- a/src/lpython/semantics/python_comptime_eval.h +++ b/src/lpython/semantics/python_comptime_eval.h @@ -1,5 +1,5 @@ -#ifndef LPYTHON_SEMANTICS_COMPTIME_EVAL_H -#define LPYTHON_SEMANTICS_COMPTIME_EVAL_H +#ifndef LCOMPILERS_SEMANTICS_COMPTIME_EVAL_H +#define LCOMPILERS_SEMANTICS_COMPTIME_EVAL_H #include #include @@ -842,4 +842,4 @@ struct PythonIntrinsicProcedures { } // namespace LCompilers -#endif /* LPYTHON_SEMANTICS_COMPTIME_EVAL_H */ +#endif /* LCOMPILERS_SEMANTICS_COMPTIME_EVAL_H */