Author Topic: CB20.03: llvm/clang project can't select target, due to too many targets  (Read 2461 times)

Offline johnxu

  • Single posting newcomer
  • *
  • Posts: 4
Codeblocks 20.03, under Ubuntu 22.04:

llvm/clang project has 100+ targets, codeblocks "Build" -> "Select Target" can't display all targets.
The bottom most "more targets available" grayed, can't click.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1564
Re: CB20.03: llvm/clang project can't select target, due to too many targets
« Reply #1 on: February 21, 2023, 09:40:08 am »
That is a known problem with 20.03, and it is fixed in trunk.

As a workaround, once the project is loaded try View -> Toolbars -> Fit toolbars or Optimize toolbars; last time it worked for me.

EDIT: Instructions above are for target selection using the wxChoice in the toolbar, you can use it instead of the menu.

EDIT2: The target menu has a built-in limit:
Code
const int maxTargetInMenus = 40;
When it is reached, a "More targets available..." menu item is created, but it is disabled!. I will investigate further...

EDIT3: The last menu item is not intended to be clicked, it is a reminder to use the first menu item. This is very confusing.
« Last Edit: February 21, 2023, 10:23:51 am by Miguel Gimenez »

Offline johnxu

  • Single posting newcomer
  • *
  • Posts: 4
Re: CB20.03: llvm/clang project can't select target, due to too many targets
« Reply #2 on: February 22, 2023, 06:50:39 am »
Thanks for your detailed reply. Now I can use wxChoise to choose "clang" as target. And I can Shift-F7 (step-in), to see clang.exe stops at main() function of clang/tools/driver/driver.cpp

I'll check performance and stability later.
« Last Edit: February 22, 2023, 08:09:52 am by johnxu »