Commit Graph

475 Commits

Author SHA1 Message Date
gingerBill
5337b0b471 Revert "Remove debug message"
This reverts commit 22d16c20f8.

Revert "Correct global constant procedure initialization"

This reverts commit 697c839c84.

Revert "Clean up how procedures are typed in LLVM's dumb type system"

This reverts commit de8bd88d2a.
2022-08-16 16:16:36 +01:00
gingerBill
22d16c20f8 Remove debug message 2022-08-12 12:29:32 +01:00
gingerBill
697c839c84 Correct global constant procedure initialization 2022-08-12 12:29:11 +01:00
gingerBill
de8bd88d2a Clean up how procedures are typed in LLVM's dumb type system 2022-08-12 11:15:12 +01:00
gingerBill
cb0a59bb2c Eliminate use of LLVMGetElementType for pointers 2022-08-09 15:36:18 +01:00
Christoffer Lerno
9c0a3b6c60 Removed use of deprecated functions. Cleaned up most deprecated use of LLVMGetElementType. 2022-08-07 19:26:28 +02:00
gingerBill
f3aefbc443 @(require_target_feature=<string>) @(enable_target_feature=<string>)
require_target_feature - required by the target micro-architecture
enable_target_feature - will be enabled for the specified procedure only
2022-05-30 14:53:12 +01:00
gingerBill
e4743b15b1 Add @(priority_index=<int>) for foreign import 2022-05-04 16:40:12 +01:00
gingerBill
cec049b7d3 Make the link order of foreign imports deterministic 2022-05-04 16:04:26 +01: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
4474144c24 Merge pull request #1505 from jasonKercher/fix_odin_test
fix `odin test`
2022-03-14 12:09:39 +00:00
gingerBill
a7adb2fb6e Merge branch 'master' into freestanding_amd64 2022-03-14 11:02:59 +00:00
Jason Kercher
d2bc41a2df Merge remote-tracking branch 'upstream/master' into fix_odin_test 2022-03-09 17:17:40 -05:00
Sébastien Marie
f76f70c7cf openbsd: defaults to PIE executable
OpenBSD uses PIE code by default to allow the system to load the binary at a random location.

don't pass -no-pie to preserve this behaviour, and build objects with -fPIC (LLVMRelocPIC).
2022-02-28 15:24:22 +00:00
gingerBill
09e4fff5b1 -target-features:<string>
This just passes a string directly to the LLVM features string
2022-02-28 15:08:50 +00:00
gingerBill
2d89faa17c Add extra checks for -disallow-rtti 2022-02-28 14:35:38 +00:00
gingerBill
278e239973 Commit rest of code for -disallow-rtti 2022-02-28 13:40:01 +00:00
gingerBill
4a04a32e0a Change target name to freestanding_amd64_sysv 2022-02-23 11:33:28 +00:00
gingerBill
3d209798c9 Add help docs for -reloc-mode:<string> 2022-02-23 11:19:51 +00:00
gingerBill
3e5c60f746 Add -reloc-mode:<string> 2022-02-20 14:48:12 +00:00
gingerBill
1bec9e5331 Add freestanding_amd64_gnu 2022-02-20 14:19:52 +00:00
CiD-
bea2f36443 improve entry point check logic 2022-02-17 10:48:30 -05:00
CiD-
df23cf47c6 fix odin test 2022-02-16 22:08:39 -05:00
gingerBill
7386ca9272 Add new objc intrinsics: objc_(register|find)_(selector|class) 2022-02-14 11:21:21 +00:00
gingerBill
0cc40db565 Begin work on support objc intrinsics 2022-02-08 17:04:55 +00:00
gingerBill
3f59c45740 Remove main creation in llvm_backend.cpp and have it done purely in the runtime package (partial bootstrapping) 2022-01-15 17:42:10 +00:00
gingerBill
29ebe0c3c9 Rename architecture 386 to i386 2022-01-15 17:40:00 +00:00
gingerBill
6aa80ee8e4 Correct _start as an entry point 2022-01-15 15:38:09 +00:00
gingerBill
fb0a3ab7c1 Correct linkage for entry point procedures on Windows 2022-01-12 20:07:17 +00:00
gingerBill
5ec93677a0 Correct look for entry point in llvm backend (Windows only currently) 2022-01-12 19:27:49 +00:00
gingerBill
7e4067c44c Begin work to move entry point code to Odin itself rather than in C++ side 2022-01-12 19:19:43 +00:00
Dale Weiler
8f91e9307c shared library fixes 2022-01-10 17:57:33 -05:00
gingerBill
3f038428a7 Begin minimizing Ast size 2021-11-14 15:12:37 +00:00
gingerBill
dc2edd3e79 Improve support for freestanding_wasm32 2021-11-07 16:19:27 +00:00
gingerBill
3d3785a7f1 Remove many LLVM optimization passes which were causes UB due to them assuming C-like behaviour incompatible with Odin 2021-11-06 17:23:33 +00:00
gingerBill
6be104e521 Make llvm backend code use PtrMap; remove dead code 2021-11-05 16:43:53 +00:00
gingerBill
6ded538546 @(linkage=<string>) for procedures and variables; @(require) for procedures; package runtime linkage improvements; Subsequence improvements to lb_run_remove_unused_function_pass 2021-11-04 12:40:50 +00:00
gingerBill
9ab71ca0da Add ODIN_NO_CRT global constant 2021-11-04 00:50:28 +00:00
gingerBill
c5cd97dd89 Improve wasm-import semantics to allow procedures from different import paths 2021-11-02 12:54:23 +00:00
gingerBill
fca7142a3c Correct _start export for wasm* targets 2021-10-31 16:31:20 +00:00
gingerBill
bfa33bf5d3 Disable wasm64 2021-10-31 15:48:56 +00:00
gingerBill
2a5b8f53fe Add memmove and memset support for wasm 2021-10-31 12:47:50 +00:00
gingerBill
9a5216921c Add wasi_wasm32 2021-10-31 01:08:17 +00:00
gingerBill
8ef6f9dd7b Compile wasm64; Add lb_run_remove_unused_function_pass 2021-10-31 00:11:38 +01:00
gingerBill
5bc8a491a7 Begin work on supporting wasm64; Correct wasm32 compilation behaviour 2021-10-30 23:24:34 +01:00
gingerBill
7d715fe113 Add ODIN_LLVM_MINIMUM_VERSION_12 2021-10-25 16:05:22 +01:00
gingerBill
243e2e2b8a Basic support for matrix*vector, vector*matrix operations 2021-10-19 11:24:26 +01:00
gingerBill
7aac8df2f2 Add runtime._cleanup_runtime internal call 2021-10-18 12:28:46 +01:00
gingerBill
2c469a39c7 Simplify TIME_SECTION code 2021-10-12 15:09:57 +01:00
gingerBill
d386563344 Correct issue with the generated map type internals; Simplify map rehash logic to utilize resize 2021-10-07 21:23:37 +01:00