Commit Graph

5556 Commits

Author SHA1 Message Date
Jeroen van Rijn 1ea166fb97 Merge pull request #5251 from Feoramund/fix-quat-real-real-real-real
Fix a couple `quaternion` bugs
2025-06-01 20:52:46 +02:00
Feoramund 7996f89410 Show quaternion arguments in wxyz order, instead of xyzw, in mismatched type error
This is in accordance with the other error and makes sense with how
quaternions are printed with `real`/`w` coming first, then the
imaginaries, which are the `ijk`/`xyz` parts.
2025-06-01 14:36:38 -04:00
Feoramund b70d2b156a Make quaternion untyped values convert to first typed value found
This fixes an issue (#2079) where a typed argument could cause the
construction to fail on the basis of failed untyped -> typed conversion.
2025-06-01 14:35:53 -04:00
Feoramund 705ae3f343 Fix quaternion construction causing compiler crash
Previously, a construction of `quaternion(real=0, real=1, real=2,
real=3)` could crash the compiler.
2025-06-01 13:35:22 -04:00
Jeroen van Rijn 805f7ce973 Typo fix 2025-06-01 19:22:51 +02:00
Jeroen van Rijn 405bf7cd55 Also clean up .dSym on Darwin 2025-06-01 15:59:38 +02:00
Jeroen van Rijn 349a34cb1a Also delete .pdb unless -keep-executable is supplied 2025-06-01 13:37:26 +02:00
Feoramund 57019f199c Add suggestions for quaternionN or complexN conversions
Quaternions and complex numbers are constructed with `quaternion` and
`complex`, but their types are of the `*N` form.

These suggestions should point the user in the right direction.
2025-05-31 07:09:29 -04:00
Feoramund 598c1a1f19 Allow overriding object extension in -build-mode:obj 2025-05-30 08:01:23 -04:00
Feoramund 73866b6b3d Remove trailing whitespace 2025-05-30 07:31:03 -04:00
Feoramund ee8234c792 Don't double-append module name when building separate objects
`m->module_name` will already have the `BuildPath_Output` name
prepended.
2025-05-30 07:15:34 -04:00
Feoramund 3c1201fb2c Error on unterminated multi-line comment 2025-05-29 18:28:54 -04:00
Jeroen van Rijn 0d0f311df1 Always provide /PDB option to linker if generating debug info.
radlink by default places the .PDB file in the working directory, even if /OUT says to place it elsewhere,
unlike link.exe, which places it next to the executable by default.

So, if compiling using -debug, we generate a PDB path even if -pdb-name wasn't used to override it.
2025-05-29 19:02:46 +02:00
gingerBill 7853a1db1c Fix #5228 2025-05-29 16:35:28 +01:00
gingerBill 74bab6d42f Fix #5232 by adding an edge case 2025-05-29 16:29:52 +01:00
Mohit Sethi d2b69577bc raddebugger: change table to columns 2025-05-28 22:08:14 +01:00
gingerBill 7e564c3a35 Merge pull request #5130 from odin-lang/bill/raddebugger-custom-section
RAD Debugger support through the custom `.raddbg` section
2025-05-28 11:16:34 +01:00
Laytan Laats 478c923e2c fix another type alias issue with mini cycle 2025-05-26 19:48:28 +02:00
Jeroen van Rijn 229c734820 Add comments to builtin.odin, documenting ODIN_* constants. (#5218)
And document constants not previously listed.
2025-05-26 18:58:59 +02:00
gingerBill 594f1b30b4 Add Suggestion: 'context = runtime.default_context()' 2025-05-24 14:18:16 +01:00
Jeroen van Rijn 84b140f963 Rename -keep-test-executable to -keep-executable 2025-05-23 08:47:48 +02:00
Jeroen van Rijn f716d4c88f your your 2025-05-23 08:32:16 +02:00
Jeroen van Rijn 12167bace0 Tweak #5202
Back out the new `-build-only` for tests in favor of the more established `-build-mode:test`, but retain the new `-keep-test-executable` option and default cleanup of test executables.
2025-05-23 08:28:27 +02:00
Feoramund 6c5b96948e Enable all sanitizers on FreeBSD 2025-05-22 21:39:35 -04:00
Feoramund 5b5822effc Delete test executable after running, add -keep-test-executable 2025-05-22 17:58:51 -04:00
Feoramund 0536f86268 Add -build-only for odin test command
This allows test executables to be only built, not run too.
2025-05-22 17:33:24 -04:00
gingerBill c383e550f9 Merge branch 'master' into bill/raddebugger-custom-section 2025-05-22 16:04:42 +01:00
gingerBill 34e998c1fc Merge pull request #5173 from Feoramund/fix-linux-shared-lib-runtime-call
Keep shared libraries from calling main program's startup/cleanup procs on Linux
2025-05-22 15:27:53 +01:00
Feoramund 713360a792 Keep shared libraries from calling main program's startup/cleanup procs on Linux 2025-05-22 09:40:37 -04:00
Feoramund e35e1dcc7b Only trim .odin from build filenames 2025-05-22 08:23:06 -04:00
Jeroen van Rijn f8bbeb54d4 Slight tweak. 2025-05-21 20:28:21 +02:00
Jeroen van Rijn c32b7ba593 List -subtarget in odin help build 2025-05-21 20:24:27 +02:00
Jeroen van Rijn 95183e4b9c Remove now unnecessary checks. 2025-05-21 19:37:09 +02:00
Jeroen van Rijn 96fd07e0ee Fix #5177 - Tweak error messages. 2025-05-21 19:20:58 +02:00
Feoramund c090a28b9d Add /usr/local/lib to FreeBSD linker path 2025-05-20 18:56:18 -04:00
Feoramund b018528833 Do not call disabled deferred procedures 2025-05-19 20:50:43 -04:00
Jeroen van Rijn ab95932502 -dynamic-literals 2025-05-19 20:44:27 +02:00
Jeroen van Rijn b7783cac05 Merge pull request #5181 from Feoramund/fix-5167
Make `odin help` more precise
2025-05-19 15:38:09 +02:00
Feoramund 2c25a72b45 Make certain commands fail if passed excess arguments 2025-05-19 09:28:17 -04:00
Feoramund 4495a4c58e Check for -help sooner and show it immediately 2025-05-19 09:28:17 -04:00
Feoramund a5926532a2 Sync command descriptions between odin help and usage 2025-05-19 09:28:17 -04:00
Feoramund fa63d351ac Add missing commands to odin help 2025-05-19 09:28:17 -04:00
Feoramund e8d52ac2bc Make odin help more precise about what it accepts 2025-05-19 09:28:17 -04:00
Feoramund eb051a2d7c Re-enable static map calls on AMD64 SysV 2025-05-18 17:13:39 -04:00
gingerBill dd31075c33 Merge pull request #5171 from laytan/fix-global-and-static-any
fix global and static any
2025-05-18 16:59:34 +01:00
Feoramund 591118c688 Use --sysroot instead of -Wl,-syslibroot on Darwin
This keeps the linker from using the wrong SDK and mirrors how we build
the Odin compiler itself in `build_odin.sh`.
2025-05-18 11:11:02 -04:00
Laytan Laats c35a45e823 fix global and static any
Fixes #4627
2025-05-17 16:49:30 +02:00
Jeroen van Rijn 7c80df4830 @(init), @(fini) and @(export) procedures are classified as used.
For the purposes of `-vet-unused-procedures`, exported procedures and `@(init)` and `@(fini)` are now disregarded.
2025-05-17 16:22:47 +02:00
gingerBill 8337b7cccb Merge pull request #5162 from 0xrsp/tounsigned
new compiler intrinsics type_integer_to_unsigned, type_integer_to_unsigned
2025-05-17 11:51:57 +01:00
tf2spi 2f636886a5 Add debug info for labels (#4385)
* Emit label debug info w/o location

* Insert debug label call

* Slight refactor for later fix

* Improve debug labels for block statements

* Improve debug info with for loops

* Generate label lbBlocks w/ debug

* Lightly refactor lb_add_debug_label

* Revise comments, add null check assertion

* Use LLVM-C API for debug labels

* Prefer C DILabel API for POSIX, fallback to CPP

* Use version check for LLVM-C DILabel
2025-05-15 22:11:06 +02:00