Commit Graph

3112 Commits

Author SHA1 Message Date
gingerBill
542e45de26 Increase minimum macOS version to 10.12.0 2022-05-18 12:30:26 +01:00
Tobias Mollstam
846930a07f emit optnone and noinline for all procs when opt set to minimal 2022-05-18 07:07:20 +02:00
gingerBill
23cb96de02 Commit import _ changes 2022-05-15 16:37:05 +01:00
gingerBill
5bc866e420 Allow for import _ "foo" to allow for @(init) procedures; Remove using import code 2022-05-14 14:44:24 +01:00
gingerBill
b4df272eb5 Improve -vet shadowing to allow x := x if cond else y etc 2022-05-11 12:15:37 +01:00
gingerBill
dca2fbccff Improve ternary if type inference 2022-05-11 12:15:10 +01:00
gingerBill
53c70da0b8 Correct foreign import prefix behaviour for wasm 2022-05-06 11:16:24 +01:00
gingerBill
5931e2383b Remove unneeded #if defined 2022-05-04 16:58:40 +01:00
gingerBill
e4743b15b1 Add @(priority_index=<int>) for foreign import 2022-05-04 16:40:12 +01:00
gingerBill
9f95d6fa65 Minor move around for path sets 2022-05-04 16:17:24 +01:00
gingerBill
982a1aebb3 Remove stray line 2022-05-04 16:14:42 +01:00
gingerBill
cec049b7d3 Make the link order of foreign imports deterministic 2022-05-04 16:04:26 +01:00
Jeroen van Rijn
dc323cfa1d Small fix to deprecation warning. 2022-05-04 13:29:52 +02:00
Jeroen van Rijn
d9b0c05acf Typo. 2022-05-03 13:47:13 +02:00
Jeroen van Rijn
47f637d23b Add deprecation warnings for -opt and flag=value insted of flag:value. 2022-05-03 13:37:07 +02:00
Jeroen van Rijn
59f55a2119 Make big_int_from_string return an error if not an integer. 2022-05-03 13:15:49 +02:00
Jeroen van Rijn
8bac82320f Fix -opt: parsing. 2022-05-03 11:44:55 +02:00
gingerBill
8023c8abc7 Fix @(disable=...) 2022-05-02 14:10:02 +01:00
gingerBill
18ad6c33ef Implement syscall for arm32 2022-05-01 23:32:31 +01:00
gingerBill
0e27b27b81 Fix building issues with arm32 2022-05-01 23:28:32 +01:00
gingerBill
10a311092b Add basic arm32 ABI support (linux_arm32) 2022-05-01 23:15:06 +01:00
Jeroen van Rijn
e53ba3b116 Allow -error-pos-style:default as an alias for odin 2022-04-28 18:18:25 +02:00
Jeroen van Rijn
1ed84a064b Make -error-pos-style case-insensitive. 2022-04-28 18:12:55 +02:00
Jeroen van Rijn
a1002e6960 Fix -error-pos-style:unix 2022-04-28 17:46:36 +02:00
gingerBill
904f0407f8 Add intrinsics.type_is_multi_pointer 2022-04-27 14:53:26 +01:00
gingerBill
9692496989 Add intrinsics.type_field_type 2022-04-27 12:27:53 +01:00
Jeroen van Rijn
a5342a0126 Address edge cases. 2022-04-26 13:14:09 +02:00
Jeroen van Rijn
f4723aea4c Remove redundant bit for non-Windows. 2022-04-24 13:37:26 +02:00
Jeroen van Rijn
76d48b38d3 Compiler: Allow -out: to not have an extension on *nix for executables (only). 2022-04-24 13:37:26 +02:00
Jeroen van Rijn
3cab2592c3 Compiler: Add early error for output path being a directory.
- Introduce new `Path` type and an array of build paths on the build context.
- Resolve input and output paths/files early (before parsing).
- Error early if inputs are missing or outputs are directories.
- Plumb new file path generation into linker stage instead of its adhoc method.

TODO:
- Remove more adhoc file path generation in parser and linker stage.
- Make intermediate object file generation use new path system.
- Round out and robustify Path helper functions.
2022-04-24 13:37:26 +02:00
gingerBill
8a9f7fc684 Fix #1713 2022-04-14 15:09:03 +01:00
Jeroen van Rijn
bb9165edd2 Add -help to CI tests. 2022-04-05 20:45:00 +02:00
Jeroen van Rijn
ad0a413b40 Give build/run/check/test/doc a -file flag.
A package has canonically always been a directory, but odin allowing you to build a single-file package confused newcomers who didn't understand why they could then not access variables and procedures from another file in the same directory.

This change disallows building single-file packages by default, requiring the `-file` flag to acknowledge you understand the nuance.

`-help` for these commands also clarifies the difference.

```
W:\Odin>odin build -help
odin is a tool for managing Odin source code
Usage:
        odin build [arguments]

        build   Compile directory of .odin files as an executable.
                One must contain the program's entry point, all must be in the same package.
                Use `-file` to build a single file instead.
                Examples:
                        odin build .                    # Build package in current directory
                        odin build <dir>                # Build package in <dir>
                        odin build filename.odin -file  # Build single-file package, must contain entry point.

        Flags

        -file
                Tells `odin build` to treat the given file as a self-contained package.
                This means that `<dir>/a.odin` won't have access to `<dir>/b.odin`'s contents.
```

```
W:\Odin>odin run examples\demo\demo.odin
ERROR: `odin run` takes a package as its first argument.
Did you mean `odin run examples\demo\demo.odin -file`?
The `-file` flag tells it to treat a file as a self-contained package.
```
2022-04-05 20:26:18 +02:00
Jeroen van Rijn
2e6ad2a711 Add extra help line for define/config. 2022-04-03 21:06:06 +02:00
gingerBill
d10d54710c Merge pull request #1686 from Kelimion/compile-time-assert
Allow optional message for `#assert`.
2022-04-02 15:02:46 +01:00
gingerBill
1ec997461d Add extra checks to atomic intrinsics 2022-04-02 15:00:28 +01:00
gingerBill
a232c0888c intrinsics.atomic_type_is_lock_free 2022-04-02 14:38:42 +01:00
Jeroen van Rijn
cb5a6b531a Allow optional message for #assert. 2022-04-02 15:31:50 +02:00
gingerBill
9f2d710c35 Change intrinsics.Atomic_Memory_Order fields to use Ada_Case rather than snake_case 2022-03-31 12:57:24 +01:00
gingerBill
1eac3482a6 Add checks for memory ordering on fences 2022-03-31 01:01:51 +01:00
gingerBill
6636376a81 Correct weak handling 2022-03-31 00:58:01 +01:00
gingerBill
6bc0c611ab Enforce success failure pairings of compare_exchange_*_explicit at compile time 2022-03-31 00:49:53 +01:00
gingerBill
203382461b Replace the atomic intrinsics
Matching C11 in style
2022-03-31 00:14:49 +01:00
gingerBill
72ae061769 Add intrinsics.wasm_memory_grow intrinsics.wasm_memory_size 2022-03-30 17:29:37 +01:00
gingerBill
5f3bfa66c5 Merge branch 'master' of https://github.com/odin-lang/Odin 2022-03-30 16:15:54 +01:00
gingerBill
3a4630e6b4 Correct atomic_cxchg_* atomic_cxchgweak_* intrinsics behaviour to monotonic on failure for acq, rel, and acqrel 2022-03-30 16:15:23 +01:00
gingerBill
abf0fd7efc Merge pull request #1671 from colrdavidson/add_nocrt
Make no crt work on Linux
2022-03-30 12:58:12 +01:00
Colin Davidson
a632db3618 Make no crt work on Linux 2022-03-30 04:45:22 -07:00
gitlost
8661457512 Use WIFEXITED() and WEXITSTATUS() on Unix system() exit code
(ensures Odin run returns correct exit code of built executable)
Adds test "tests/core/os/test_core_os_exit.odin" (Unix only)
2022-03-24 19:31:46 +00:00
gingerBill
f702c782f1 Make constant string backing structures use PrivateLinkage compared to InternalLinkage 2022-03-24 12:18:17 +00:00