[all-commits] [llvm/llvm-project] ca495e: [clang] Add a new flag -fexperimental-library to e...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Jul 19 12:05:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ca495e36c1b4d4b8be47c9140647e6e934913cba
      https://github.com/llvm/llvm-project/commit/ca495e36c1b4d4b8be47c9140647e6e934913cba
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2022-07-19 (Tue, 19 Jul 2022)

  Changed paths:
    M clang/docs/ClangCommandLineReference.rst
    M clang/include/clang/Basic/Features.def
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChain.cpp
    M clang/lib/Driver/ToolChains/AIX.cpp
    M clang/lib/Driver/ToolChains/BareMetal.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/CloudABI.cpp
    M clang/lib/Driver/ToolChains/CrossWindows.cpp
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/lib/Driver/ToolChains/FreeBSD.cpp
    M clang/lib/Driver/ToolChains/Fuchsia.cpp
    M clang/lib/Driver/ToolChains/Hexagon.cpp
    M clang/lib/Driver/ToolChains/MipsLinux.cpp
    M clang/lib/Driver/ToolChains/NaCl.cpp
    M clang/lib/Driver/ToolChains/OpenBSD.cpp
    M clang/lib/Driver/ToolChains/VEToolchain.cpp
    M clang/lib/Driver/ToolChains/WebAssembly.cpp
    A clang/test/Driver/experimental-library-flag.cpp
    R clang/test/Driver/unstable-flag.cpp
    R clang/test/Lexer/has_feature_cxx_unstable.cpp
    A clang/test/Lexer/has_feature_experimental_library.cpp

  Log Message:
  -----------
  [clang] Add a new flag -fexperimental-library to enable experimental library features

Based on the discussion at [1], this patch adds a Clang flag called
-fexperimental-library that controls whether experimental library
features are provided in libc++. In essence, it links against the
experimental static archive provided by libc++ and defines a feature
that can be picked up by libc++ to enable experimental features.

This ensures that users don't start depending on experimental
(and hence unstable) features unknowingly.

[1]: https://discourse.llvm.org/t/rfc-a-compiler-flag-to-enable-experimental-unstable-language-and-library-features

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




More information about the All-commits mailing list