[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 16:40:18 PST 2020


MaskRay added a comment.

On Arch Linux side, I reported a similar issue https://bugs.archlinux.org/task/64464#comment183541 for ldc (LLVM-based D compiler)

  % cmake -H. -BArch -G Ninja -DCMAKE_BUILD_TYPE=Debug -DD_COMPILER=$HOME/dlang/dmd-2.089.0/linux/bin64/dmd -DCMAKE_CXX_STANDARD=14 -DLDC_WITH_LLD=On
  % ninja -C Arch
  ...
  : CommandLine Error: Option 'mc-relax-all' registered more than once!
  % Arch/bin/ldc2
  : CommandLine Error: Option 'mc-relax-all' registered more than once!
  LLVM ERROR: inconsistency in registered CommandLine options

I agree that moving global constructors from `.inc` files into `lib/CodeGen/CommandFlags/CommandFlags.cpp` is the correct direction.

Testing several configurations helps capture build problems early:

- `-DBUILD_SHARED_LIBS=off` (default)
- `-DBUILD_SHARED_LIBS=off` `-DLLVM_LINK_LLVM_DYLIB=on` `-DCLANG_LINK_CLANG_DYLIB=on`
- `-DBUILD_SHARED_LIBSS=on`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75579/new/

https://reviews.llvm.org/D75579





More information about the cfe-commits mailing list