[all-commits] [llvm/llvm-project] 3b3fa1: [Clang][Interpreter] Respect default setting on Wi...

aokblast via All-commits all-commits at lists.llvm.org
Sat Jul 18 05:53:36 PDT 2026


  Branch: refs/heads/users/aokblast/clang_rapl/fix_pic_windows
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b3fa1453b0655867ccd354e90d57efb05cf6c24
      https://github.com/llvm/llvm-project/commit/3b3fa1453b0655867ccd354e90d57efb05cf6c24
  Author: ShengYi Hung <aokblast at FreeBSD.org>
  Date:   2026-07-18 (Sat, 18 Jul 2026)

  Changed paths:
    M clang/lib/Interpreter/Interpreter.cpp

  Log Message:
  -----------
  [Clang][Interpreter] Respect default setting on Windows

MSCV does not support the -fPIC option. When it is passed, Clang falls
back to PIC level 2 on x86_64 and to a static binary on AArch64. Without
-fPIC, however, PIC is already enabled by default on both targets.

As a result, the PCH (built with the default PIC level by toolchain
hint) and the clang-repl instance (using the fallback PIC level) end up
with different PIC settings, consuming a mismatch.

Avoid passing -fPIC when targeting MSVC on Windows. This preserve the
existing semantics, since PIC is already enabled by default, while
ensuring that both the PCH and clang-repl use the same PIC level.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list