Commit Graph

83 Commits

Author SHA1 Message Date
Sourabh Singh Tomar
6a7deff58e [flang] Remove LINK_WITH_FIR cmake switch
Most components required for this are already there.

Build and Testing clean.
ninja check-flang

Reviewed By: clementval, tskeith

Differential Revision: https://reviews.llvm.org/D96411
2021-02-11 22:52:13 +05:30
Raul Tambre
480643a95c [CMake] Remove dead code setting policies to NEW
cmake_minimum_required(VERSION) calls cmake_policy(VERSION),
which sets all policies up to VERSION to NEW.
LLVM started requiring CMake 3.13 last year, so we can remove
a bunch of code setting policies prior to 3.13 to NEW as it
no longer has any effect.

Reviewed By: phosek, #libunwind, #libc, #libc_abi, ldionne

Differential Revision: https://reviews.llvm.org/D94374
2021-01-19 17:19:36 +02:00
Andrzej Warzynski
a1bbd1ef1d [flang][driver] Unify f18_version.h.in and Version.inc.in
Flang has two CMake configurable header files that define compiler
version numbers:
* f18_version.h.in - only used in f18.cpp (uses version numbers from
  LLVM's macro definitions)
* Version.inc.in - not currently used (uses version numbers hard-coded
  in Flang's top CMake script)

Currently only f18_version.h.in provides version numbers consistent with
other subprojects in llvm-project. However, its location and name are
inconsistent with e.g. Clang. This patch merges the two headers
together:
  * hard-coded version numbers in Flang's top CMake script are deleted
  * Version.inc.in is updated to provide string versions of version
  numbers (required by f18.cpp)
  * f18_version.h.in is deleted as it's no longer needed

Differential Revision: https://reviews.llvm.org/D94422
2021-01-14 13:50:46 +00:00
Andrzej Warzynski
42e89ab2a6 [flang] Fix CMake bug in the definition of flang-new
Recent patch that improved Flang's compatibility with respect to how LLVM
dynamic libraries should be linked (and specified in CMake recipes),
introduced a bug in the definition of `flang-new`:
  * https://reviews.llvm.org/D87893
More specifically, `add_flang_tool` does not support the
`LINK_COMPONENTS` CMake argument.  Instead, one should set
`LLVM_LINK_COMPONENTS` before calling `add_flang_tool`.

This patch reverts the change for `flang-new` from
https://reviews.llvm.org/D87893, and instead:
  * sets `LLVM_LINK_COMPONENTS`
  * calls `clang_target_link_libraries` to add Clang dependencies

Differential Revision: https://reviews.llvm.org/D89403
2020-10-14 19:24:10 +01:00
Serge Guelton
cde06f783c [flang] Make flang build compatible with LLVM dylib
Harmonize usage of LLVM components througout Flang.

Explicit LLVM Libs where used across several CMakeFIles, which led to
incompatibilities with LLVM shlibs.
Fortunately, the LLVM component system can be relied on to harmoniously handle
both cases.

Differential Revision: https://reviews.llvm.org/D87893
2020-10-14 14:27:25 +02:00
Dave Lee
b36bdfe5ca [cmake] Centralize LLVM_ENABLE_WARNINGS option
Configure default value of `LLVM_ENABLE_WARNINGS` in `HandleLLVMOptions.cmake`.

`LLVM_ENABLE_WARNINGS` is documented as ON by default, but `HandleLLVMOptions` assumes the default has been set somewhere else. If it has not been explicitly set, then `HandleLLVMOptions` implicitly uses OFF as a default.

This removes the various `option()` declarations in favor of a single declaration in `HandleLLVMOptions`. This will prevent the unwanted use of `-w` that is mentioned in a couple of the comments.

Reviewed By: DavidTruby, #libunwind, JDevlieghere, compnerd

Differential Revision: https://reviews.llvm.org/D87243
2020-09-21 10:23:17 -07:00
Caroline Concatto
257b29715b [flang][driver] Add the new flang compiler and frontend drivers
Summary:

This is the first patch implementing the new Flang driver as outlined in [1],
[2] & [3]. It creates Flang driver (`flang-new`) and Flang frontend driver
(`flang-new -fc1`). These will be renamed as `flang` and `flang -fc1` once the
current Flang throwaway driver, `flang`, can be replaced with `flang-new`.

Currently only 2 options are supported: `-help` and `--version`.

`flang-new` is implemented in terms of libclangDriver, defaulting the driver
mode to `FlangMode` (added to libclangDriver in [4]). This ensures that the
driver runs in Flang mode regardless of the name of the binary inferred from
argv[0].

The design of the new Flang compiler and frontend drivers is inspired by it
counterparts in Clang [3]. Currently, the new Flang compiler and frontend
drivers re-use Clang libraries: clangBasic, clangDriver and clangFrontend.

To identify Flang options, this patch adds FlangOption/FC1Option enums.
Driver::printHelp is updated so that `flang-new` prints only Flang options.
The new Flang driver is disabled by default. To enable it, set
`-DBUILD_FLANG_NEW_DRIVER=ON` when configuring CMake and add clang to
`LLVM_ENABLE_PROJECTS` (e.g. -DLLVM_ENABLE_PROJECTS=“clang;flang;mlir”).

[1] “RFC: new Flang driver - next steps”
http://lists.llvm.org/pipermail/flang-dev/2020-July/000470.html
[2] “RFC: Adding a fortran mode to the clang driver for flang”
http://lists.llvm.org/pipermail/cfe-dev/2019-June/062669.html
[3] “RFC: refactoring libclangDriver/libclangFrontend to share with Flang”
http://lists.llvm.org/pipermail/cfe-dev/2020-July/066393.html
[4] https://reviews.llvm.org/rG6bf55804924d5a1d902925ad080b1a2b57c5c75c

co-authored-by: Andrzej Warzynski <andrzej.warzynski@arm.com>

Reviewed By: richard.barton.arm, sameeranjoshi

Differential Revision: https://reviews.llvm.org/D86089
2020-09-11 10:55:54 +01:00
Diana Picus
d4b88ac165 [cmake] Use absolute paths for modules search
For out of tree builds, the user generally needs to specify LLVM_DIR and
MLIR_DIR on the command line so that the correct LLVM and MLIR
installations are picked up.

If the provided paths are absolute, everything works fine, however for
buildbots it is customary to work with relative paths, and that makes it
difficult for CMake to find the right modules to include.

This patch changes CMakeLists.txt to convert LLVM_DIR and MLIR_DIR to
absolute paths before adding them to CMAKE_MODULE_PATH. The inputs are
assumed to be relative to the source directory (llvm-project/flang).

Differential Revision: https://reviews.llvm.org/D87083
2020-09-09 13:56:19 +02:00
Pavel Labath
9cb222e749 [cmake] Make gtest include directories a part of the library interface
This applies the same fix that D84748 did for macro definitions.
Appropriate include path is now automatically set for all libraries
which link against gtest targets, which avoids the need to set
include_directories in various parts of the project.

Differential Revision: https://reviews.llvm.org/D86616
2020-08-27 15:35:57 +02:00
Tim Keith
a9795b6f63 [flang] Disable -Wmaybe-uninitialized for GCC
According to llvm/cmake/config-ix.cmake, gcc's potentially uninitialized
use analysis has lots of false positives. We are encountering one in
flang/lib/Lower/CharacterExpr.cpp.

That warning is disabled for gcc in in-tree builds; this does the same
thing for out-of-tree builds.

Differential Revision: https://reviews.llvm.org/D85694
2020-08-11 07:20:15 -07:00
Andrzej Warzynski
621681e3e5 [Flang] Fix multi-config generator builds
Based on https://reviews.llvm.org/D84022 with additional changes to
maintain out-of-tree builds.

Original commit message:
Currently the binaries are output directly into the bin subdirectory of
the build directory. This doesn't work correctly with multi-config
generators which should output the binaries into <CONFIG_NAME>/bin
instead.

The original patch was implemented by David Truby and the additional
changes added here were also proposed by David Truby.

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

Co-authored-by: David Truby <david.truby@arm.com>
2020-08-05 08:59:11 +01:00
Tim Keith
765b81f6b9 Revert "[flang] Fix multi-config generator builds."
This reverts commit 332170356e.

The change breaks out-of-tree builds.
Discussion in https://reviews.llvm.org/D84022
2020-07-31 11:10:44 -07:00
David Truby
332170356e [flang] Fix multi-config generator builds.
Summary:
Currently the binaries are output directly into the bin subdirectory of the
build directory. This doesn't work correctly with multi-config generators which
should output the binaries into <CONFIG_NAME>/bin instead.

Reviewers: sscalpone, richard.barton.arm

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84022
2020-07-30 09:56:52 +01:00
David Truby
4ef2e594d5 [flang] Run non-gtest unit tests with lit.
Summary:
As a corrollary, these tests are now run as part of the check-flang
target.

Reviewers: sscalpone

Subscribers: mgorny, delcypher, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83946
2020-07-24 14:49:39 +01:00
Louis Dionne
afa1afd410 [CMake] Bump CMake minimum version to 3.13.4
This upgrade should be friction-less because we've already been ensuring
that CMake >= 3.13.4 is used.

This is part of the effort discussed on llvm-dev here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html

Differential Revision: https://reviews.llvm.org/D78648
2020-07-22 14:25:07 -04:00
Isuru Fernando
9017b9ce1a [flang] Turn off FLANG_ENABLE_WERROR by default
Summary: This is a follow up to https://reviews.llvm.org/D78306

Reviewers: DavidTruby, sscalpone, jdoerfert

Reviewed By: DavidTruby

Subscribers: tskeith, Meinersbur, ChinouneMehdi, richard.barton.arm, mehdi_amini, mgorny, llvm-commits

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D81695
2020-07-14 12:17:51 -05:00
sameeran joshi
fa5d416efd [flang]Fix individual tests with lit when building out of tree
Summary:

Fix individual check tests with lit when building out-of-tree
`ninja check-flang-<folder>` was not working.
The CMakeLists.txt was looking for the lit tests in the source directory
instead of the build directory.

This commit extends @CarolineConcatto previous patch[D81002]

Reviewers: DavidTruby, sscalpone, tskeith, CarolineConcatto, jdoerfert

Reviewed By: DavidTruby

Subscribers: flang-commits, llvm-commits, CarolineConcatto

Tags: #flang, #llvm

Differential Revision: https://reviews.llvm.org/D82120
2020-06-22 10:30:33 +05:30
sameeran joshi
93f602b339 [flang] unit test support for out-of-tree and in-tree using google tests framework
Review comments addressed.
2020-06-15 22:09:56 +05:30
Isuru Fernando
3862cbbc65 [flang] Use LLVM's flags
Summary:
The only difference is that LLVM_ENABLE_WERROR is set to OFF
by default, but we enable this in a standalone flang build

This commit fixes some windows issues with the flags

Reviewers: DavidTruby, jdoerfert, sscalpone

Reviewed By: DavidTruby, sscalpone

Subscribers: ormris, richard.barton.arm, mehdi_amini, Meinersbur, ChinouneMehdi, tskeith, mgorny, llvm-commits

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D78306
2020-06-08 15:29:52 +01:00
David Truby
81bf1e29aa [flang] Fix release build flags.
Summary:
This patch removes the custom CMAKE_RELEASE_CXX_FLAGS variable.
This variable being set was having the effect of removing other important
Release flags, notably `-DNDEBUG`.

This patch may need to be accompanied by fixes for the macOS issues that
the removed comment mentions; I don't have a mac to test this on though so
hopefully a reviewer can help with that.

Reviewers: Andrzej, tskeith, sscalpone

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80794
2020-06-02 16:29:12 +01:00
sameeran joshi
807fe05d35 [flang][docs] Doxygen support in flang.
Summary:
    Added support for doxygen-style documentation generation from source code.
    Added -DLLVM_ENABLE_DOXYGEN=ON -DFLANG_INCLUDE_DOCS=ON flags to cmake.
    Added the target doxygen-flang for building doxygen
    Updated README.txt

    Reviewers: DavidTruby, richard.barton.arm, sscalpone,  mehdi_amini, jdoerfert

    Reviewed By: DavidTruby, richard.barton.arm, sscalpone

    Previous review: https://github.com/flang-compiler/f18/pull/1065

    Differential Revision: https://reviews.llvm.org/D78136
2020-04-27 15:02:29 +05:30
Steve Scalpone
282358fac9 [flang] [mlir rebase] Add MLIR config and react to MLIR name changes (flang-compiler/f18#1090)
[mlir rebase] Add MLIR config and react to MLIR name changes

Similar to flang-compiler/f18#1085.  Now use the MLIR package to set up paths for include files and libraries.  Three MLIR names changed:
 * VectorOpsDialect to VectorDialect
 * AffineOpsDialect to AffineDialect
 * createVectorizePass to createSuperVectorizePass

Update README.md to explain how to link with MLIR. Update the example gcc to version 8.3.

Update drone.io config to define -DMLIR_DIR

Co-authored-by: Jean Perier <jperier@nvidia.com>

Original-commit: flang-compiler/f18@116f64315f
Reviewed-on: https://github.com/flang-compiler/f18/pull/1090
2020-03-27 09:23:32 -07:00
Patrick McCormick
6c16aa4f67 [flang] A rework of the cmake build components for in and out of tree builds.
In general all the basic functionality seems to work and removes some redundancy
and more complicated features in favor of borrowing infrastructure from LLVM
build configurations. Here's a quick summary of details and remaining issues:

  * Testing has spanned Ubuntu 18.04 & 19.10, CentOS 7, RHEL 8, and
    MacOS/darwin.  Architectures include x86_64 and Arm.  Without
    access to Window nothing has been tested there yet.

  * As we change file and directory naming schemes (i.e.,
    capitalization) some odd things can occur on MacOS systems with
    case preserving but not case senstive file system configurations.
    Can be painful and certainly something to watch out for as any
    any such changes continue.

  * Testing infrastructure still needs to be tuned up and worked on.
    Note that there do appear to be cases of some tests hanging (on
    MacOS in particular).  They appear unrelated to the build
    process.

  * Shared library configurations need testing (and probably fixing).

  * Tested both standalone and 'in-mono repo' builds.  Changes for
    supporting the mono repo builds will require LLVM-level changes that
    are straightforward when the time comes.

  * The configuration contains a work-around for LLVM's C++ standard mode
    passing down into Flang/F18 builds (i.e., LLVM CMake configuration would
    force a -std=c++11 flag to show up in command line arguments.  The
    current configuration removes that automatically and is more strict in
    following new CMake guidelines for enforcing C++17 mode across all the
    CMake files.

  * Cleaned up a lot of repetition in the command line arguments.  It
    is likely that more work is still needed to both allow for
    customization and working around CMake defailts (or those
    inherited from LLVM's configuration files). On some platforms agressive
    optimization flags (e.g. -O3) can actually break builds due to the inlining
    of templates in .cpp source files that then no longer are available for use
    cases outside those source files (shows up as link errors).   Sticking at -O2
    appears to fix this.  Currently this CMake configuration forces this in
    release mode but at the cost of stomping on any CMake, or user customized,
    settings for the release flags.

  * Made the lit tests non-source directory dependent where appropriate. This is
    done by configuring certain test shell files to refer to the correct paths
    whether an in or out of tree build is being performed. These configured
    files are output in the build directory. A %B substitution is introduced in
    lit to refer to the build directory, mirroring the %S substitution for the
    source directory, so that the tests can refer to the configured shell scripts.

Co-authored-by: David Truby <david.truby@arm.com>

Original-commit: flang-compiler/f18@d1c7184159
Reviewed-on: https://github.com/flang-compiler/f18/pull/1045
2020-03-26 18:17:04 +00:00
Luke Ireland
da9d002b18 [flang] Added CMakeLists changes, moved config and made test scripts compatible.
All Fortran tests are now run in lit, except Preprocessing tests flang-compiler/f18#1052
Preprocessing tests are a separate kind of test, so will be sorted out
later.

Original-commit: flang-compiler/f18@3f99d35f3d
Reviewed-on: https://github.com/flang-compiler/f18/pull/1027
2020-03-13 13:54:24 +00:00
Luke Ireland
ee5fa1f233 [flang] Create a separate directory for unittests
Some of the regression tests are C programs that act as test harnesses
for the compiler internals as opposed to being Fortran inputs to test
the compiler in action. The former style of tests are analog to LLVM's
unittests and will not use the lit framework.

Change-Id: I0ff10e23f66ff843e8fff4c35cfb6559b9dab762

Original-commit: flang-compiler/f18@2bfddbe8f8
Reviewed-on: https://github.com/flang-compiler/f18/pull/1027
Tree-same-pre-rewrite: false
2020-03-13 11:58:11 +00:00
jeanPerier
57f536a448 [flang] Add Fortran IR (FIR) MLIR dialect implementation (flang-compiler/f18#1035)
Adds FIR library that implements an MLIR dialect to which Fortran
parse-tree will be lowered to.

FIR is defined and documented inside FIROps.td added in this commit.
It is possible to generate a more readable description FIRLangRef.md
from FIROps.td following the related instructions added to the README.md
by this commit.

This patch adds FIR definition and implementation that allow parsing,
printing, and verifying FIR. FIR transformations and lowering to Standard
and LLVM dialects are not part of this patch. The FIR verifiers are verifying
the basic properties of FIR operations in order to provide a sufficient
frame for lowering. Verifiers for more advanced FIR properties can be added
as needed.

Coarrays are not covered by FIR defined in this patch.

This patch also adds tco tool that is meant to process FIR input files and
drives transformations on it. The tco tool is used for testing.
In this patch, it is only used to demonstrate parsing/verifying/
and dumping FIR with round-trip tests.

Note:
This commit does not reflect an actual work log, it is a feature-based split of the
changes done in the FIR experimental branch. The related work log can be found in the
commits between:

742edde572
and
2ff5524212

Changes on top of these original commits were made during this patch review.

Original-commit: flang-compiler/f18@30b428a51e
Reviewed-on: https://github.com/flang-compiler/f18/pull/1035
2020-03-11 21:47:22 -07:00
David Truby
d545a132bc [flang] Link against zlib when LLVM does.
Original-commit: flang-compiler/f18@2260abe4c2
Reviewed-on: https://github.com/flang-compiler/f18/pull/1043
2020-03-02 14:19:10 +00:00
Jean Perier
3364086795 [flang] Add Pre-FIR Tree structure to help lowering the parse-tree
The Pre-FIR Tree structure is a transient data structure that
is meant to be built from the parse tree just before lowering to
FIR and that will be deleted just afterwards. It is not meant to perfrom
optimization analysis and transformations. It only provides temporary
information, such as label target information or parse tree parent nodes,
that is meant to be used to lower the parse tree structure into
FIR operations.
A PFTBuilder class builds the Pre-Fir Tree from the parse-tree.
A pretty printer is available to visualize this data structure.

- Lit tests are added to:
  1. that the PFT tree structure is as expected
  2. that the PFT captures all intented nodes

- Cmake changes: Prevent warnings inisde LLVM headers when compiling flang

The issue is that some LLVM headers  define functions where the usage of
the parameters depend on environment ifdef. See for instance Size in:
5f940220bf/llvm/include/llvm/Support/Compiler.h (L574)

Because flang is build with -Werror and -Wunused-parameter is default in
clang, this may breaks build in some environments (like with clang9 on macos).
A solution would be to add -Wno-unused-parameter to flang CmakLists.txt,
but it is wished to keep this warning on flang sources for quality purposes.
Fixing LLVM headers is not an easy task and `[[maybe_unused]]` is C++17 and
cannot be used yet in LLVM headers.
Hence, this fix simply silence warnings coming from LLVM headers by telling
CMake they are to be considered as if they were system headers.

- drone.io changes: remove llvm 6.0 from clang config in drone.io and link
flang with libstdc++ instead of libc++

llvm-dev resolved to llvm-6.0 in clang builds on drone.io. llvm 6.0 too old.
LLVM packages are linked with libstdc++ standard library whereas libc++ was
used for flang. This caused link time failure when building clang. Change
frone.io to build flang with libc++.

Note:
This commit does not reflect an actual work log, it is a feature based split of the
changes done in the FIR experimental branch. The related work log can be found in the
commits between:
864898cbe509d032abfe1172ec367dbd3dd92bc1
and
137c23da9c64cf90584cf81fd646053a69e91f63

Other changes come from https://github.com/flang-compiler/f18/pull/959 review.

Original-commit: flang-compiler/f18@edb0943bca
Reviewed-on: https://github.com/flang-compiler/f18/pull/959
2020-02-17 02:38:49 -08:00
CarolineConcatto
0d9dd49ed4 [flang] Regression tests configuration for f18 repository (flang-compiler/f18#861)
The configuration for the tests are in lit.* files.
The lit tests rely on the presence of llvm-lit,FileCheck, not and  count.
When building LLVM add:
-DLLVM_INSTALL_UTILS=On at the cmake command.
LLVM_LIT is found by setting LLVM_EXTERNAL_LIT in f18 CMakeLists.txt.

This patch:
  * Uses LLVM_EXTERNAL_LIT
  * Adds regression tests configurations
  * Adds a proof of concept regression test

The regression test needs to have the Utils build in LLVM.
This is done by adding:
  -DLLVM_INSTALL_UTILS=On
to the LLVM build cmake.

Signed-off-by: Caroline Concatto <caroline.concatto@arm.com>

Original-commit: flang-compiler/f18@a58c6067a1
Reviewed-on: https://github.com/flang-compiler/f18/pull/861
2020-01-14 08:20:49 -08:00
Gary Klimowicz
cea1040d51 [flang] Minor format change to LLVM license lines
Replace comment lines containing all dashes with the
proper ===-----....----=== markers.

Original-commit: flang-compiler/f18@a8936b0d41
Reviewed-on: https://github.com/flang-compiler/f18/pull/922
2020-01-10 12:12:03 -08:00
Gary Klimowicz
9e7548ab31 [flang] Flang relicensing changes for LLVM Apache 2.0 license
This changes the license information in many of the flang source files.
- Renamed LICENSE to LICENSE.txt.
- NVIDIA Copyright lines have been removed.
- Initial lines for files follow the LLVM coding convention (file name on the first line; Emacs mode information on the first line).
- License references have been replaced with the abridged LLVM text.
- License information was removed from the test files.
- No file header was placed on test files (these weren't in most LLVM test files).
- License information was added to documentation files where it was missing.

We did not add brief file summaries to the initial line.

See http://llvm.org/docs/DeveloperPolicy.html#new-llvm-project-license-framework
for a description of the new license.

See http://llvm.org/docs/CodingStandards.html#file-headers
for a description of the new LLVM standard file header.

Original-commit: flang-compiler/f18@add6cde724
Reviewed-on: https://github.com/flang-compiler/f18/pull/887
2019-12-23 10:26:16 -08:00
arjunsuresh1987
562b067439 [flang] Fix file path in cmake (flang-compiler/f18#844)
Original-commit: flang-compiler/f18@4771f8cb78
Reviewed-on: https://github.com/flang-compiler/f18/pull/844
2019-12-10 14:07:56 -08:00
peter klausler
637b933202 [flang] Enable more warnings, clean them up
Original-commit: flang-compiler/f18@c6b3420e5f
Reviewed-on: https://github.com/flang-compiler/f18/pull/774
Tree-same-pre-rewrite: false
2019-10-02 12:40:52 -07:00
peter klausler
d8c9b50fd6 [flang] Prep for review
Original-commit: flang-compiler/f18@8be02a41c7
Reviewed-on: https://github.com/flang-compiler/f18/pull/755
Tree-same-pre-rewrite: false
2019-09-25 09:04:35 -07:00
peter klausler
fa3410d5fb [flang] Clean out some dead code, improve naming & comments
Original-commit: flang-compiler/f18@3495555565
Reviewed-on: https://github.com/flang-compiler/f18/pull/715
Tree-same-pre-rewrite: false
2019-09-09 09:26:36 -07:00
peter klausler
7749d43f3f [flang] Another pass with clean builds
Original-commit: flang-compiler/f18@e05dc1f444
Reviewed-on: https://github.com/flang-compiler/f18/pull/666
2019-08-16 09:41:08 -07:00
peter klausler
10688e0903 [flang] Enable more warnings, deal with fallout
Original-commit: flang-compiler/f18@65c5b485af
Reviewed-on: https://github.com/flang-compiler/f18/pull/666
Tree-same-pre-rewrite: false
2019-08-16 09:41:07 -07:00
peter klausler
73632f5c36 [flang] Enable some new warnings, clean up some of their consequences
Original-commit: flang-compiler/f18@b82d1e9ac9
Reviewed-on: https://github.com/flang-compiler/f18/pull/666
Tree-same-pre-rewrite: false
2019-08-16 09:41:06 -07:00
peter klausler
b3c7a79e2d [flang] -fno-exceptions
Original-commit: flang-compiler/f18@81d09c2053
Reviewed-on: https://github.com/flang-compiler/f18/pull/503
Tree-same-pre-rewrite: false
2019-06-18 14:11:55 -07:00
Steve Scalpone
057fb5c2d0 [flang] Remove extra spaces.
Original-commit: flang-compiler/f18@777bf033b5
Reviewed-on: https://github.com/flang-compiler/f18/pull/497
2019-06-12 21:01:26 -07:00
Steve Scalpone
43b6209ed9 [flang] Our coding conventions prohibit rtti; enforce with the -fno-rtti compilation flag.
Original-commit: flang-compiler/f18@d2817cc9c2
Reviewed-on: https://github.com/flang-compiler/f18/pull/497
Tree-same-pre-rewrite: false
2019-06-12 17:01:41 -07:00
Steve Scalpone
1de9ecd251 [flang] Add CMake rules to install static and shared libraries in
the default install directory or in the directory specified
with CMAKE_INSTALL_PREFIX.  Fixes flang-compiler/f18#359.

Original-commit: flang-compiler/f18@35ce1628e2
Reviewed-on: https://github.com/flang-compiler/f18/pull/364
2019-03-28 09:55:56 -07:00
peter klausler
ad057a42fa [flang] Remove OwningPointer, use unique_ptr better instead.
Original-commit: flang-compiler/f18@89aff868aa
Reviewed-on: https://github.com/flang-compiler/f18/pull/346
Tree-same-pre-rewrite: false
2019-03-20 11:38:45 -07:00
Tim Keith
9a6823bf4e [flang] Change default for LINK_WITH_FIR to ON.
Original-commit: flang-compiler/f18@b13f994463
Reviewed-on: https://github.com/flang-compiler/f18/pull/331
2019-03-14 09:08:27 -07:00
Tim Keith
1c9f8d408e [flang] Add cmake option to link with FIR and LLVM
The cmake option -DLINK_WITH_FIR=ON causes the f18 driver to be linked
against FIR and LLVM. When it is set to OFF (the default), the call into
FIR is #ifdef'd out.

The source in lib/FIR is always built; this option only affects linking.

Original-commit: flang-compiler/f18@69569edd4c
Reviewed-on: https://github.com/flang-compiler/f18/pull/329
2019-03-13 12:41:15 -07:00
Steve Scalpone
8fedd37b38 [flang] To use LLVM's libc++ instead of GCC's libstdc++, define
BUILD_WITH_CLANG_LIBRARIES on the cmake command line to
be the path to a clang installation with bin, lib, etc.
For this to work, BUILD_WITH_CLANG must be defined too.

Original-commit: flang-compiler/f18@a36d5fee42
Reviewed-on: https://github.com/flang-compiler/f18/pull/326
2019-03-11 10:49:46 -07:00
Tim Keith
f8995fcefa [flang] Remove build dependency on clang
For now all we need to depend on is LLVM.
Use llvm_map_components_to_libnames to find libraries to link against.

Original-commit: flang-compiler/f18@dff1402c2a
Reviewed-on: https://github.com/flang-compiler/f18/pull/321
2019-03-08 15:16:58 -08:00
peter klausler
7f4fb7f89f [flang] update copyright date
Original-commit: flang-compiler/f18@c9dbc96042
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
2019-01-23 16:31:17 -08:00
peter klausler
85ea49eaba [flang] tweak CMakeLists.txt options
Original-commit: flang-compiler/f18@64ba0c0d6e
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
2019-01-22 16:31:21 -08:00
peter klausler
db5b3fbd89 [flang] Enable building f18 as shared libraries
Original-commit: flang-compiler/f18@4544d75af1
Reviewed-on: https://github.com/flang-compiler/f18/pull/265
Tree-same-pre-rewrite: false
2019-01-22 16:31:19 -08:00