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 a predefined macro to define "x86_64" to 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.
Thanks for fixing this. Should this be fixed, too?
This was added since the codegen supports it (https://github.com/llvm/llvm-project/blob/25915c6ad2cb248b99fd61015e34fa9e819397b3/flang/lib/Optimizer/CodeGen/Target.cpp#L345-L357).
Does this fix mean that 32-bit machine won't be supported and the following code development need not to consider 32-bit machine?