Skip to content

Commit 4841d70

Browse files
authored
[flang] Remove obsolete flang-to-external-fc tool (#88904)
It seems like the `flang-to-external-fc` tool is no longer needed, because Flang is now a full compiler in its own right. After PR #85249 has landed, this tool will not be able to pick up the `.f18.mod` files.
1 parent c045955 commit 4841d70

File tree

3 files changed

+0
-528
lines changed

3 files changed

+0
-528
lines changed

flang/docs/FlangDriver.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -266,26 +266,6 @@ is `ParseSyntaxOnlyAction`, which corresponds to `-fsyntax-only`. In other
266266
words, `flang-new -fc1 <input-file>` is equivalent to `flang-new -fc1 -fsyntax-only
267267
<input-file>`.
268268

269-
## The `flang-to-external-fc` script
270-
The `flang-to-external-fc` wrapper script for `flang-new` was introduced as a
271-
development tool and to facilitate testing. The `flang-to-external-fc` wrapper
272-
script will:
273-
* use `flang-new` to unparse the input source file (i.e. it will run `flang-new
274-
-fc1 -fdebug-unparse <input-file>`), and then
275-
* call a host Fortran compiler, e.g. `gfortran`, to compile the unparsed file.
276-
277-
Here's a basic breakdown of what happens inside `flang-to-external-fc` when you
278-
run `flang-to-external-fc file.f90`:
279-
```bash
280-
flang-new -fc1 -fdebug-unparse file.f90 -o file-unparsed.f90
281-
gfortran file-unparsed.f90
282-
```
283-
This is a simplified version for illustration purposes only. In practice,
284-
`flang-to-external-fc` adds a few more frontend options and it also supports
285-
various other use cases (e.g. compiling C files, linking existing object
286-
files). `gfortran` is the default host compiler used by `flang-to-external-fc`.
287-
You can change it by setting the `FLANG_FC` environment variable.
288-
289269
## Adding new Compiler Options
290270
Adding a new compiler option in Flang consists of two steps:
291271
* define the new option in a dedicated TableGen file,

flang/tools/f18/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,6 @@ endif()
9393

9494
add_custom_target(module_files ALL DEPENDS ${MODULE_FILES})
9595

96-
# This flang shell script will only work in a POSIX shell.
97-
if (NOT WIN32)
98-
configure_file(
99-
${CMAKE_CURRENT_SOURCE_DIR}/flang-to-external-fc.in
100-
${CMAKE_BINARY_DIR}/bin/flang-to-external-fc
101-
@ONLY
102-
)
103-
add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc)
104-
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc DESTINATION "${CMAKE_INSTALL_BINDIR}")
105-
endif()
106-
10796
# TODO Move this to a more suitable location
10897
# Copy the generated omp_lib.h header file, if OpenMP support has been configured.
10998
if (LLVM_TOOL_OPENMP_BUILD)

0 commit comments

Comments
 (0)