llvm-project/flang/tools/f18
Peter Steinfeld 1cfae76ed9 [Flang] Adjust preprocessing to build modules correctly
Several module files in .../llvm-project/flang/module check for the
existence of the macro "__x86_64__" to conditionally compile Fortran
code.  Unfortunately, this macro was not being defined anywhere.  This
patch fixes that for compilations targeting 64 bit x86 machines.

I made the following changes --
  -- Removed the test for 32 bit X86 targets.  The rest of the compiler and
  runtime do not support X86 32 bits.
  -- Added predefined macros to define "__x86_64__"  and "__x86__64" to
  be 1 when the target architecture is 64 bit x86 and the "-cpp" option
  is on the command line.
  -- Changed the cmake file for creating the Fortran module files to use the
  "-cpp" option so that the macro "__x86_64__" will be defined when building
  the module files.
  -- Added a test.

Differential Revision: https://reviews.llvm.org/D135810
2022-10-14 12:27:48 -07:00
..
CMakeLists.txt [Flang] Adjust preprocessing to build modules correctly 2022-10-14 12:27:48 -07:00
dump.cpp [flang] Reformat with latest clang-format and .clang-format 2020-03-28 21:00:16 -07:00
flang-to-external-fc.in [flang] Fix flang-to-external-fc --version 2022-07-19 14:10:46 +02:00