From 61b1ea12674df00d65b1df278d9ca821d7056644 Mon Sep 17 00:00:00 2001 From: Thirumalai-Shaktivel Date: Sun, 5 Jun 2022 11:33:07 +0530 Subject: [PATCH] Rename LPYTHON macro define to LCOMPILERS --- CMakeLists.txt | 26 +++++++++---------- build1.sh | 2 +- src/bin/CMakeLists.txt | 2 +- src/lpython/parser/parser.h | 4 +-- src/lpython/parser/parser_exception.h | 6 ++--- src/lpython/parser/parser_stype.h | 6 ++--- src/lpython/parser/semantics.h | 4 +-- src/lpython/parser/tokenizer.h | 6 ++--- src/lpython/semantics/python_attribute_eval.h | 6 ++--- src/lpython/semantics/python_comptime_eval.h | 6 ++--- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cf7214e3a8..a855d18d650 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 b73689fd16e..418222435ab 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 7262a66c50b..8550a77d5c9 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 3992bdd4cf6..0c68e2c0647 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 68c2fdfba99..abc30c1f041 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 e4591ed9eb9..a491dcd5c34 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 dfa4cd86c02..246856d80b5 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 b0ce51fb44e..c674132de61 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 b3cdf88df7b..ddd673d77f9 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 d8fc2259056..fc9bacda7f0 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 */