| ... | ... | @@ -385,6 +385,16 @@ pub fn resolveTargetQuery(query: Target.Query) DetectError!Target { |
| 385 | 385 | query.cpu_features_sub, |
| 386 | 386 | ); |
| 387 | 387 | |
| 388 | if (cpu_arch == .hexagon) { |
| 389 | // Both LLVM and LLD have broken support for the small data area. Yet LLVM has the feature |
| 390 | // on by default for all Hexagon CPUs. Clang sort of solves this by defaulting the `-gpsize` |
| 391 | // command line parameter for the Hexagon backend to 0, so that no constants get placed in |
| 392 | // the SDA. (This of course breaks down if the user passes `-G <n>` to Clang...) We can't do |
| 393 | // the `-gpsize` hack because we can have multiple concurrent LLVM emit jobs, and command |
| 394 | // line options in LLVM are shared globally. So just force this feature off. Lovely stuff. |
| 395 | result.cpu.features.removeFeature(@intFromEnum(Target.hexagon.Feature.small_data)); |
| 396 | } |
| 397 | |
| 388 | 398 | // https://github.com/llvm/llvm-project/issues/105978 |
| 389 | 399 | if (result.cpu.arch.isArmOrThumb() and result.floatAbi() == .soft) { |
| 390 | 400 | result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2)); |