diff --git a/ci/build.xsh b/ci/build.xsh index 79fb6c2800..41ec6ad960 100755 --- a/ci/build.xsh +++ b/ci/build.xsh @@ -57,6 +57,6 @@ jupyter kernelspec list --json cp lpython-$lpython_version/test-bld/src/bin/lpython src/bin if $WIN == "1": - cp lpython-$lpython_version/test-bld/src/runtime/lfortran_runtime* src/runtime/ + cp lpython-$lpython_version/test-bld/src/runtime/lpython_runtime* src/runtime/ else: - cp lpython-$lpython_version/test-bld/src/runtime/liblfortran_runtime* src/runtime/ + cp lpython-$lpython_version/test-bld/src/runtime/liblpython_runtime* src/runtime/ diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index 32e2292587..a49e1cf7c9 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -294,24 +294,24 @@ int link_executable(const std::vector &infiles, The `gcc` line for dynamic linking that is constructed below: gcc -o $outfile $infile \ - -Lsrc/runtime -Wl,-rpath=src/runtime -llfortran_runtime + -Lsrc/runtime -Wl,-rpath=src/runtime -llpython_runtime is equivalent to the following: ld -o $outfile $infile \ - -Lsrc/runtime -rpath=src/runtime -llfortran_runtime \ + -Lsrc/runtime -rpath=src/runtime -llpython_runtime \ -dynamic-linker /lib64/ld-linux-x86-64.so.2 \ /usr/lib/x86_64-linux-gnu/Scrt1.o /usr/lib/x86_64-linux-gnu/libc.so and this for static linking: gcc -static -o $outfile $infile \ - -Lsrc/runtime -Wl,-rpath=src/runtime -llfortran_runtime_static + -Lsrc/runtime -Wl,-rpath=src/runtime -llpython_runtime_static is equivalent to: ld -o $outfile $infile \ - -Lsrc/runtime -rpath=src/runtime -llfortran_runtime_static \ + -Lsrc/runtime -rpath=src/runtime -llpython_runtime_static \ /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o \ /usr/lib/x86_64-linux-gnu/libc.a \ /usr/lib/gcc/x86_64-linux-gnu/7/libgcc_eh.a \ @@ -357,7 +357,7 @@ int link_executable(const std::vector &infiles, for (auto &s : infiles) { cmd += s + " "; } - cmd += runtime_library_dir + "\\lfortran_runtime_static.lib"; + cmd += runtime_library_dir + "\\lpython_runtime_static.lib"; int err = system(cmd.c_str()); if (err) { std::cout << "The command '" + cmd + "' failed." << std::endl; @@ -369,13 +369,13 @@ int link_executable(const std::vector &infiles, if (env_CC) CC = env_CC; std::string base_path = "\"" + runtime_library_dir + "\""; std::string options; - std::string runtime_lib = "lfortran_runtime"; + std::string runtime_lib = "lpython_runtime"; if (static_executable) { if (compiler_options.platform != LFortran::Platform::macOS_Intel && compiler_options.platform != LFortran::Platform::macOS_ARM) { options += " -static "; } - runtime_lib = "lfortran_runtime_static"; + runtime_lib = "lpython_runtime_static"; } std::string cmd = CC + options + " -o " + outfile + " "; for (auto &s : infiles) { diff --git a/src/lpython/CMakeLists.txt b/src/lpython/CMakeLists.txt index 8e6327ed7f..dacb94e7d8 100644 --- a/src/lpython/CMakeLists.txt +++ b/src/lpython/CMakeLists.txt @@ -16,7 +16,7 @@ if (WITH_XEUS) ) endif() add_library(lfortran_lib ${SRC}) -target_link_libraries(lfortran_lib asr lfortran_runtime_static ZLIB::ZLIB) +target_link_libraries(lfortran_lib asr lpython_runtime_static ZLIB::ZLIB) target_include_directories(lfortran_lib BEFORE PUBLIC ${lfortran_SOURCE_DIR}/src) target_include_directories(lfortran_lib BEFORE PUBLIC ${lfortran_BINARY_DIR}/src) if (WITH_XEUS) diff --git a/src/runtime/legacy/CMakeLists.txt b/src/runtime/legacy/CMakeLists.txt index e226dceb93..0a8830d195 100644 --- a/src/runtime/legacy/CMakeLists.txt +++ b/src/runtime/legacy/CMakeLists.txt @@ -1,17 +1,17 @@ set(SRC ../impure/lfortran_intrinsics.c ) -add_library(lfortran_runtime SHARED ${SRC}) -set_target_properties(lfortran_runtime PROPERTIES +add_library(lpython_runtime SHARED ${SRC}) +set_target_properties(lpython_runtime PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../$<0:> LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../$<0:> ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../$<0:>) -add_library(lfortran_runtime_static STATIC ${SRC}) -set_target_properties(lfortran_runtime_static PROPERTIES +add_library(lpython_runtime_static STATIC ${SRC}) +set_target_properties(lpython_runtime_static PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../$<0:> LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../$<0:> ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../$<0:>) -install(TARGETS lfortran_runtime lfortran_runtime_static +install(TARGETS lpython_runtime lpython_runtime_static RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ARCHIVE DESTINATION share/lpython/lib LIBRARY DESTINATION share/lpython/lib diff --git a/src/runtime/ltypes/ltypes.py b/src/runtime/ltypes/ltypes.py index 8b4dc41660..da5fe5ab70 100644 --- a/src/runtime/ltypes/ltypes.py +++ b/src/runtime/ltypes/ltypes.py @@ -122,11 +122,11 @@ def get_rtlib_dir(): return os.path.join(current_dir, "..") def get_crtlib_name(): if platform.system() == "Linux": - return "liblfortran_runtime.so" + return "liblpython_runtime.so" elif platform.system() == "Darwin": - return "liblfortran_runtime.dylib" + return "liblpython_runtime.dylib" elif platform.system() == "Windows": - return "lfortran_runtime.dll" + return "lpython_runtime.dll" else: raise NotImplementedError("Platform not implemented") def get_crtlib_path(): diff --git a/src/runtime/tests/CMakeLists.txt b/src/runtime/tests/CMakeLists.txt index 0711d438b4..f959bd0da7 100644 --- a/src/runtime/tests/CMakeLists.txt +++ b/src/runtime/tests/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) -project(lfortran_runtime_tests C Fortran) +project(lpython_runtime_tests C Fortran) if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug @@ -43,11 +43,11 @@ set(SRC ../pure/lfortran_intrinsic_ieee_arithmetic.f90 ../pure/lfortran_intrinsic_iso_c_binding.f90 ) -add_library(lfortran_runtime SHARED ${SRC}) -add_library(lfortran_runtime_static STATIC ${SRC}) +add_library(lpython_runtime SHARED ${SRC}) +add_library(lpython_runtime_static STATIC ${SRC}) macro(ADDTEST name) add_executable(${name} ${name}.f90) - target_link_libraries(${name} lfortran_runtime ${ARGN}) + target_link_libraries(${name} lpython_runtime ${ARGN}) add_test(${name} ${PROJECT_BINARY_DIR}/${name}) endmacro(ADDTEST)