Skip to content

Conversation

perazz
Copy link
Member

@perazz perazz commented Aug 31, 2025

Fixes #1089.

This PR makes LLVM Flang (flang-new) a first-class citizen in fpm by updating compiler identification and flag support.
Since Classic Flang is deprecated, this change makes flang resolve to the modern LLVM implementation while preserving access to the legacy compiler, now flang-classic.

Changes Made

  • Both "flang" and "flang-new" now resolve to id_flang_new (LLVM Flang)
  • "flang-classic" now resolves to id_flang (Classic Flang)
  • id_flang compiler name changed from "flang" to "flang-classic"

Added Complete Flag Support for flang-new

Based on the official flang-new command line reference:

  • Debug/optimization: -g, -O3
  • Source form: -ffree-form, -ffixed-form
  • Implicit typing: -fimplicit-none
  • C preprocessor: -cpp
  • Platform-aware -fPIC handling (disabled on Windows MSVC target)

Backward Compatibility

  • Existing flang-new usage unchanged
  • Legacy users can use flang-classic

cc: @rouson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interpret "flang" and "flang-new" as LLVM flang
1 participant