forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang] Don't use FortranDecimal for runtime (llvm#121997)
Avoid using the same library for runtime and compiler. `FortranDecimal` was used in two ways: 1. As an auxiliary library needed for `libFortranRuntime.a`. This patch adds the two source files of FortranDecimal directly into FortranRuntime, so `FortranRuntime` is not used anymore. 2. As a library used by the Flang compiler. As the only remaining use of the library, extra CMake code to make it compatible with the runtime can be removed. Before this PR, `enable_cuda_compilation` is applied to `FortranDecimal` which causes everything that links to it, including flang (the compiler), to depend on libcudart when CUDA support is enabled. Having two runtime library just makes everything more complicated while the user ideally should not be concerned with how the runtime is structured internally. Some logic was copied for FortranDecimal because of this, such as the ability to be compiled out-of tree (b75a3c9) which is undocumented, the logic to link against the various versions of Microsofts runtime library (llvm#70833), and avoiding dependency on the C++ runtime (7783bba).
- Loading branch information
1 parent
612df14
commit 98e118c
Showing
11 changed files
with
11 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,5 +25,4 @@ | |
! platform individually. | ||
|
||
! CHECK-NOT: "-lFortranRuntime" | ||
! CHECK-NOT: "-lFortranDecimal" | ||
! CHECK-NOT: "-lgcc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters