[flang-commits] [flang] 4b763c4 - [flang] Rename `flang` as `flang-to-external-fc`

Andrzej Warzynski via flang-commits flang-commits at lists.llvm.org
Tue May 31 11:42:14 PDT 2022


Author: Andrzej Warzynski
Date: 2022-05-31T18:37:50Z
New Revision: 4b763c4ef83501e7884eae062d449e8185839da0

URL: https://github.com/llvm/llvm-project/commit/4b763c4ef83501e7884eae062d449e8185839da0
DIFF: https://github.com/llvm/llvm-project/commit/4b763c4ef83501e7884eae062d449e8185839da0.diff

LOG: [flang] Rename `flang` as `flang-to-external-fc`

Our ultimate goal is to rename `flang-new` as `flang`. This is "Step 1"
in which we only rename the bash wrapper script, `flang`, as
`flang-to-external-fc`. The new name more accurately reflects what the
wrapper script does.

With this patch, `flang` becomes a symbolic link pointing to
`flang-to-external-fc`. This allows a smooth transmission for any
buildbots that use this script. Once the buildbots are reconfigured to
use the updated name, CMake rule for the symbolic link will be removed.

For more context see:
  * https://discourse.llvm.org/t/rename-flang-new-as-flang,
  * https://reviews.llvm.org/D125788.

Differential Revision: https://reviews.llvm.org/D125832

Added: 
    flang/tools/f18/flang-to-external-fc

Modified: 
    flang/tools/f18/CMakeLists.txt

Removed: 
    flang/tools/f18/flang


################################################################################
diff  --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index 798f3edd06019..3e96c84c439b7 100644
--- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt
@@ -51,12 +51,14 @@ add_custom_target(module_files ALL DEPENDS ${MODULE_FILES})
 # This flang shell script will only work in a POSIX shell.
 if (NOT WIN32)
   add_custom_command(
-    OUTPUT ${CMAKE_BINARY_DIR}/bin/flang
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/flang
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang ${CMAKE_BINARY_DIR}/bin)
-  add_custom_target(flang ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang)
-  install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${CMAKE_INSTALL_BINDIR}")
+    OUTPUT ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin)
+  add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc)
+  install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc DESTINATION "${CMAKE_INSTALL_BINDIR}")
 endif()
+add_custom_target(flang-slink ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc COMMAND ${CMAKE_COMMAND} -E create_symlink
+  ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc ${CMAKE_BINARY_DIR}/bin/flang)
 
 # TODO Move this to a more suitable location
 file(COPY ${FLANG_SOURCE_DIR}/module/omp_lib.h DESTINATION "${CMAKE_BINARY_DIR}/include/flang/OpenMP/" FILE_PERMISSIONS OWNER_READ OWNER_WRITE)

diff  --git a/flang/tools/f18/flang b/flang/tools/f18/flang-to-external-fc
similarity index 100%
rename from flang/tools/f18/flang
rename to flang/tools/f18/flang-to-external-fc


        


More information about the flang-commits mailing list