Commit Graph

497 Commits

Author SHA1 Message Date
jakubtomsu
00874e39ad fix 2026-04-10 12:53:28 +02:00
jakubtomsu
bf4aa9b556 stronger +/- checks in check_target_feature_is_enabled 2026-04-10 12:47:12 +02:00
mtarik34b
ac17852f36 Add option to show docs in source order within each file 2026-03-28 02:26:39 +01:00
gingerBill
25c10c18cc Remove tilde backend 2026-03-26 11:49:39 +00:00
Yawning Angel
62d78d61fa src: Allow clang-style +/- for target features
This largely works as expected, except that as far as I can tell,
without explicit annotations added to the caller, (or a
`#force_inline`), the LLVM `target-features` function attribute
gets ignored by the inliner under the rationale of `-sse,-avx,-avx2`
is a subset of `+sse,+avx,+avx2`.

With `#force_no_inline` the correct code does get generated, but in
the regression I am trying to fix, the caller gratuitously also uses
SIMD, leading to horrific performance.
2026-03-19 19:25:23 +09:00
gingerBill
5fa274cb6a -internal-rvo 2026-03-15 22:10:03 +00:00
gingerBill
b3b31cdba7 -internal-llvm-mem2reg 2026-03-15 22:04:27 +00:00
Jeroen van Rijn
7a8b6d189e Merge pull request #6404 from botero-dev/android-platforms
Add support for other Android architectures
2026-03-11 22:34:25 +01:00
Andrés Botero
9df092759e Add support for other Android architectures 2026-03-11 15:37:37 -05:00
gingerBill
b7bb7a1dc4 Use scope_reserve call directly 2026-03-11 14:22:36 +00:00
Jeroen van Rijn
6386b395de Add -did-you-mean-limit:N
```
-did-you-mean-limit:<integer>
        Sets the maximum number of suggestions the compiler provides.
        Must be an integer >0.
        If not set, the default limit is 10.
```
e.g. with a limit of 5

```
W:/Scratch/main.odin(44:7) Error: Undeclared name 'B1' for type 'E'
	e = .B1
	     ^^
	Suggestion: Did you mean?
		A23
		A02
		A19
		A20
		A21
		... and 25 more ...
```
2026-02-13 15:15:03 +01:00
gingerBill
ae91b9b369 Add -show-import-graph 2026-02-10 22:16:15 +00:00
gingerBill
f3daaa62fe Merge pull request #6220 from laytan/fix-lto-macos
fix LTO on MacOS
2026-02-02 18:46:18 +00:00
Laytan Laats
afbbb829ea fix LTO on MacOS
If no `-minimum-os-version` is given, ignore the `override-module`
warnings. The user not using, `-minimum-os-version` opts you into linker
warnings about target versions.

If a `-minimum-os-version` is provided, normalize it to a full version
`11` to `11.0.0` for example. The linker seems to want that when doing
LTO.
2026-02-02 18:13:48 +01:00
Jeroen van Rijn
6a07f70c1c support -> supported 2026-02-02 17:57:50 +01:00
Jesse Meyer
1a7f78b665 Add ThinLTO support via -lto:thin and -lto:thin-files flags
- Add -lto:thin and -lto:thin-files CLI flags with validation
- Emit LLVM bitcode (.bc) instead of object files when LTO is enabled
- Pass -flto=thin and -flto-jobs to clang/lld linkers
- Guard linkage corrections to skip declarations without definitions
  (required for LTO where declarations appear across modules)
- Allow module-per-file with LTO even at higher optimization levels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:04:53 -05:00
gingerBill
19b545e7cb Merge branch 'master' into bill/feature-using-stmt 2026-01-30 10:49:55 +00:00
gingerBill
afe4369f6e Add #+feature force-type-assert which overrides -no-type-assert on a per-file basis 2026-01-26 15:37:54 +00:00
Karl Zylinski
ab0de6d33a Added target freestanding_amd64_mingw for building freestanding on windows without MSVC installed (use for example clang-mingw) 2026-01-20 14:11:30 +01:00
gingerBill
557e854864 -disable-unwind 2026-01-15 18:12:39 +00:00
gingerBill
d139c72fc2 Make using as a statement an opt-in with #+feature using-stmt 2025-12-21 11:53:44 +00:00
gingerBill
32f459e152 Change target triple of freestanding_amd64_win64 to x86_64-pc-windows-msvc to fix a bug with LLVM's code generation 2025-12-17 10:36:42 +00:00
Jeroen van Rijn
f726f7aff4 Make Karl Zylinski happy 2025-10-27 16:23:54 +01:00
gingerBill
d267891ac9 Merge pull request #5797 from harold-b/hb.export-linked-libs
Add build flag to export the linked libraries
2025-10-12 10:52:50 +01:00
Harold Brenes
937161f68d Add -export-linked-libs-file build flag.
This build flag writes a list of the libraries that were linked during the build to the specified file.
2025-10-12 01:03:27 -04:00
Yhya Ibrahim
c4a8af0f0d Check for + and - in the target features set 2025-10-11 15:48:12 +03:00
gingerBill
9e8be055c1 Rename to -build-diagnostics 2025-09-29 16:16:19 +01:00
gingerBill
53f4fc1cbb Add -para-poly-diagnostics 2025-09-29 14:03:32 +01:00
gingerBill
e9f6456b52 Remove _test.odin filter 2025-09-27 14:13:28 +01:00
gingerBill
5f76d6ce15 Support -linker:mold 2025-09-19 10:25:11 +01:00
gingerBill
9cf69576ab More improvements to minimize code gen size 2025-09-18 20:58:24 +01:00
gingerBill
738a72943b Try moving parapoly procs into a separate module when doing weak monomorphization 2025-09-18 15:04:16 +01:00
gingerBill
01258d4817 Multithread "check all scope usages" 2025-09-10 19:38:30 +01:00
gingerBill
a36a8722dc Minimize more thread contention 2025-09-10 19:30:32 +01:00
gingerBill
21b1173076 Minor clean up of permanent/temporary arena usage 2025-09-10 18:20:20 +01:00
gingerBill
8df69c95c3 Add -integer-division-by-zero:all-bits 2025-08-10 18:29:08 +01:00
gingerBill
983f3ec423 Add #+feature global-context
This allows to use of `context` in the global scope on a per file basis.
2025-08-10 15:03:30 +01:00
gingerBill
ee01643229 Add -integer-division-by-zero:self 2025-08-08 10:41:05 +01:00
gingerBill
991883d0e1 Add #+feature integer-division-by-zero:<string> 2025-08-08 10:24:44 +01:00
gingerBill
e4a0228a80 Define the behaviour of integer division by zero 2025-08-08 10:00:11 +01:00
gingerBill
2561427dd3 Add string16 and cstring16 (UTF-16 based strings) 2025-08-02 11:00:15 +01:00
Laytan
af0b90bd3e fix flag 2025-07-29 19:07:28 +02:00
Laytan
e7670e58dd saner stack linker flags for WASM
Supersedes #5425
2025-07-29 18:50:27 +02:00
gingerBill
513e6daace Merge pull request #5081 from Lperlind/vet-explicit-allocators
Add -vet-explicit-allocators
2025-07-22 11:06:12 +01:00
Harold Brenes
7c917d56e9 Check for invalid subtargets.
- Add 'ios' pseudo-subtarget which triggets with either iPhone or iPhoneSimulator subtargets.

- Treat an explicit 'default' subtarget as exclusive only to the default subtarget, not an other platform-compatible subtargets.

- 'generic' continues to resolve to true for any platform-compatible subtarget as it names appears to imply such behavior.
2025-07-20 14:35:06 -04:00
Harold Brenes
63b9cb18ef Missing rename in panic string 2025-07-14 22:32:06 -04:00
Harold Brenes
bab4ce11fc Rename iOS subtarget to iPhone for consistency.
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
2025-07-14 21:55:28 -04:00
Harold Brenes
77e5c71414 Fix correct versioned target triplet for iphonesimulator subtarget
- Always set the `-m*-version-min` linker flag for non-macOS Darwin subtargets
2025-07-14 14:28:07 -04:00
Harold Brenes
070943aa98 Provide default minimum version for iOS and apply its target triplet.
- Fix incorrect clang_path override for iOS during link stage.
2025-07-14 12:59:25 -04:00
Harold Brenes
0e245fb40f Updated iOS/iPhoneSimulator build support 2025-07-13 20:17:30 -04:00