Skip to content

Commit e85d9f1

Browse files
committed
Post-merge fixes
1 parent 3b67f4a commit e85d9f1

File tree

9 files changed

+31
-32
lines changed

9 files changed

+31
-32
lines changed

flang-rt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ if (LLVM_LIBRARY_OUTPUT_INTDIR AND LLVM_RUNTIME_OUTPUT_INTDIR AND PACKAGE_VERSIO
7373
endif()
7474

7575
if (LLVM_TREE_AVAILABLE)
76-
# Despite Clang in the name, get_clang_resource_dir does not depend on Clang being added to the build
77-
# flang-new uses the same resource dir as clang.
76+
# Despite Clang in the name, get_clang_resource_dir does not depend on Clang
77+
# being added to the build. Flang uses the same resource dir as clang.
7878
include(GetClangResourceDir)
7979
get_clang_resource_dir(FLANG_RT_BUILD_LIB_DIR PREFIX "${LLVM_LIBRARY_OUTPUT_INTDIR}/.." SUBDIR "lib${LLVM_LIBDIR_SUFFIX}")
8080
get_clang_resource_dir(FLANG_RT_INSTALL_LIB_DIR SUBDIR "lib${LLVM_LIBDIR_SUFFIX}") # No prefix, CMake's install command finds the install prefix itself

flang-rt/README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cmake -S <path-to-llvm-project>/llvm \
6565

6666
By default, the enabled runtimes will only be built for the host platform
6767
(`-DLLVM_RUNTIME_TARGETS=default`). To add additional targets to support
68-
cross-compilation via `flang-new --target=<target-triple>`, add more triples to
68+
cross-compilation via `flang --target=<target-triple>`, add more triples to
6969
`LLVM_RUNTIME_TARGETS`, such as
7070
`-DLLVM_RUNTIME_TARGETS="default;aarch64-linux-gnu"`.
7171

@@ -84,7 +84,7 @@ Instead of building Clang and Flang from scratch, the Runtime-only build uses
8484
CMake's environment introspection to find a C, C++, and Fortran compiler. The
8585
compiler to be used can be controlled using CMake's standard mechanisms such as
8686
`CMAKE_CXX_COMPILER`, `CMAKE_CXX_COMPILER`, and `CMAKE_Fortran_COMPILER`.
87-
`CMAKE_Fortran_COMPILER` must be `flang-new` built from the same Git commit as
87+
`CMAKE_Fortran_COMPILER` must be `flang` built from the same Git commit as
8888
flang-rt to ensure they are using the same ABI. The C and C++ compiler
8989
can be any compiler supporting the same ABI.
9090

@@ -94,12 +94,12 @@ Use `CMAKE_BINARY_DIR` to point to directory where LLVM has been built.
9494
A simple build configuration might look like the following:
9595

9696
```bash
97-
cmake -S <path-to-llvm-project>/runtimes \
98-
-GNinja \
99-
-DLLVM_BINARY_DIR=<path-to-llvm-builddir> \
100-
-DCMAKE_Fortran_COMPILER=<path-to-llvm-builddir>/bin/flang-new \
101-
-DCMAKE_Fortran_COMPILER_WORKS=yes \
102-
-DLLVM_ENABLE_RUNTIMES=flang-rt \
97+
cmake -S <path-to-llvm-project>/runtimes \
98+
-GNinja \
99+
-DLLVM_BINARY_DIR=<path-to-llvm-builddir> \
100+
-DCMAKE_Fortran_COMPILER=<path-to-llvm-builddir>/bin/flang \
101+
-DCMAKE_Fortran_COMPILER_WORKS=yes \
102+
-DLLVM_ENABLE_RUNTIMES=flang-rt \
103103
...
104104
```
105105

@@ -116,19 +116,19 @@ driver using the `-L` option.
116116
A more complete build configuration could be the following:
117117

118118
```bash
119-
cmake -S <path-to-llvm-project>/runtimes \
120-
-GNinja \
121-
-DCMAKE_BUILD_TYPE=Release \
122-
-DCMAKE_INSTALL_PREFIX="${HOME}/local" \
123-
-DLLVM_ENABLE_RUNTIMES="compiler-rt;flang-rt" \
124-
-DCMAKE_C_COMPILER=gcc \
125-
-DCMAKE_CXX_COMPILER=g++ \
126-
-DLLVM_BINARY_DIR=<path-to-llvm-builddir> \
127-
-DLLVM_DIR=<path-to-llvm-builddir>/lib/cmake/llvm \
128-
-DClang_DIR=<path-to-llvm-builddir>/lib/cmake/clang \
129-
-DCMAKE_Fortran_COMPILER=<path-to-llvm-builddir-or-installprefix>/bin/flang-new \
130-
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnu \
131-
-DLLVM_RUNTIMES_TARGET=x86_64-linux-gnu \
119+
cmake -S <path-to-llvm-project>/runtimes \
120+
-GNinja \
121+
-DCMAKE_BUILD_TYPE=Release \
122+
-DCMAKE_INSTALL_PREFIX="${HOME}/local" \
123+
-DLLVM_ENABLE_RUNTIMES="compiler-rt;flang-rt" \
124+
-DCMAKE_C_COMPILER=gcc \
125+
-DCMAKE_CXX_COMPILER=g++ \
126+
-DLLVM_BINARY_DIR=<path-to-llvm-builddir> \
127+
-DLLVM_DIR=<path-to-llvm-builddir>/lib/cmake/llvm \
128+
-DClang_DIR=<path-to-llvm-builddir>/lib/cmake/clang \
129+
-DCMAKE_Fortran_COMPILER=<path-to-llvm-builddir-or-installprefix>/bin/flang \
130+
-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnu \
131+
-DLLVM_RUNTIMES_TARGET=x86_64-linux-gnu \
132132
...
133133
```
134134

flang-rt/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
tools = [
6565
ToolSubst(
6666
"%flang",
67-
command=FindTool("flang-new"),
67+
command=FindTool("flang"),
6868
extra_args=isysroot_flag,
6969
unresolved="fatal",
7070
)

flang/include/flang/Frontend/CompilerInvocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
#ifndef FORTRAN_FRONTEND_COMPILERINVOCATION_H
1414
#define FORTRAN_FRONTEND_COMPILERINVOCATION_H
1515

16-
#include "flang/Common/LangOptions.h"
1716
#include "flang/Frontend/CodeGenOptions.h"
1817
#include "flang/Frontend/FrontendOptions.h"
1918
#include "flang/Frontend/PreprocessorOptions.h"
2019
#include "flang/Frontend/TargetOptions.h"
2120
#include "flang/Lower/LoweringOptions.h"
2221
#include "flang/Parser/parsing.h"
2322
#include "flang/Semantics/semantics.h"
23+
#include "flang/Support/LangOptions.h"
2424
#include "clang/Basic/Diagnostic.h"
2525
#include "clang/Basic/DiagnosticOptions.h"
2626
#include "llvm/Option/ArgList.h"

flang/include/flang/Semantics/semantics.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "scope.h"
1313
#include "symbol.h"
14-
#include "flang/Common/LangOptions.h"
1514
#include "flang/Evaluate/common.h"
1615
#include "flang/Evaluate/intrinsics.h"
1716
#include "flang/Evaluate/target.h"

flang/include/flang/Tools/CrossToolHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#ifndef FORTRAN_TOOLS_CROSS_TOOL_HELPERS_H
1414
#define FORTRAN_TOOLS_CROSS_TOOL_HELPERS_H
1515

16-
#include "flang/Common/LangOptions.h"
1716
#include "flang/Frontend/CodeGenOptions.h"
17+
#include "flang/Support/LangOptions.h"
1818
#include "flang/Support/MathOptionsBase.h"
1919
#include <cstdint>
2020

flang/tools/bbc/bbc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
///
1515
//===----------------------------------------------------------------------===//
1616

17-
#include "flang/Common/LangOptions.h"
1817
#include "flang/Frontend/TargetOptions.h"
1918
#include "flang/Lower/Bridge.h"
2019
#include "flang/Lower/PFTBuilder.h"
@@ -38,6 +37,7 @@
3837
#include "flang/Semantics/semantics.h"
3938
#include "flang/Semantics/unparse-with-symbols.h"
4039
#include "flang/Support/Fortran-features.h"
40+
#include "flang/Support/LangOptions.h"
4141
#include "flang/Support/OpenMP-features.h"
4242
#include "flang/Support/Version.h"
4343
#include "flang/Support/default-kinds.h"

llvm/cmake/modules/LLVMExternalProjectUtils.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function(llvm_ExternalProject_Add name source_dir)
9292
if(NOT ARG_TOOLCHAIN_TOOLS)
9393
set(ARG_TOOLCHAIN_TOOLS clang)
9494
if (ARG_ENABLE_FORTRAN)
95-
list(APPEND ARG_TOOLCHAIN_TOOLS flang-new)
95+
list(APPEND ARG_TOOLCHAIN_TOOLS flang)
9696
endif ()
9797
# AIX 64-bit XCOFF and big AR format is not yet supported in some of these tools.
9898
if(NOT _cmake_system_name STREQUAL AIX)
@@ -144,7 +144,7 @@ function(llvm_ExternalProject_Add name source_dir)
144144
set(CLANG_IN_TOOLCHAIN On)
145145
endif()
146146

147-
if(flang-new IN_LIST TOOLCHAIN_TOOLS)
147+
if(flang IN_LIST TOOLCHAIN_TOOLS)
148148
set(FLANG_IN_TOOLCHAIN On)
149149
endif()
150150

@@ -231,7 +231,7 @@ function(llvm_ExternalProject_Add name source_dir)
231231
endif()
232232
endif()
233233
if(FLANG_IN_TOOLCHAIN)
234-
list(APPEND compiler_args -DCMAKE_Fortran_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/flang-new${CMAKE_EXECUTABLE_SUFFIX})
234+
list(APPEND compiler_args -DCMAKE_Fortran_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/flang${CMAKE_EXECUTABLE_SUFFIX})
235235
endif()
236236
if(lld IN_LIST TOOLCHAIN_TOOLS)
237237
if(is_msvc_target)

llvm/runtimes/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ if(build_runtimes)
472472
foreach(dep FileCheck
473473
clang
474474
clang-offload-packager
475-
flang-new
475+
flang
476476
count
477477
lld
478478
lli

0 commit comments

Comments
 (0)