aboutsummaryrefslogtreecommitdiff
path: root/src/build_settings.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | llvm-18: enable static map calls on non amd64sysv targetsLaytan Laats2024-05-071-3/+2
| | | |
* | | | llvm-18: fix undocumented breaking change on i128 alignmentLaytan2024-05-071-31/+20
| | | |
* | | | llvm-18: enable sroa and static map callsLaytan Laats2024-05-071-0/+2
| | | |
* | | | llvm-18: linux (amd64)Laytan2024-05-071-1/+1
| | | |
* | | | Merge pull request #3526 from laytan/target-featuresgingerBill2024-05-051-92/+525
|\ \ \ \ | | | | | | | | | | Improve target features support
| * | | | compiler: improve target features supportLaytan Laats2024-05-021-92/+525
| | |_|/ | |/| |
* / | | Minimally support compiling Odin on FreeBSD arm64Feoramund2024-05-051-1/+14
|/ / / | | | | | | | | | This is enough to get Odin itself compiling and the demo running.
* | / wasm: allow `-default-to-nil-allocator`Laytan Laats2024-04-281-2/+4
| |/ |/|
* | fix linking with clang-18Laytan2024-04-221-73/+29
| | | | | | | | | | | | | | | | | | | | | | | | Because we currently just use the clang from the user's path linking suddenly breaks when the user updates their system clang to 18 with an error about an unknown option -arch. I had already fixed it for my LLVM 18 PR but it seems like a good idea to get this in already to avoid that breakage (had a few people come to the Discord with it and an issue). This fixes #3461
* | normalize_pathThomas la Cour2024-04-201-4/+2
| |
* | Add `-no-type-assert` and `ODIN_NO_TYPE_ASSERT`gingerBill2024-04-181-0/+1
| |
* | Add `-target:freestanding_amd64_win64`gingerBill2024-04-111-1/+12
| |
* | Add `-vet-unused-variables` and ``-vet-unused-imports` (`-vet-unused` is both)gingerBill2024-04-111-7/+14
|/
* Merge pull request #3374 from laytan/fix-128-ints-alignment-arm64gingerBill2024-04-041-1/+1
|\ | | | | fix 128 bit int alignment on arm64
| * fix 128 bit int alignment on arm64Laytan Laats2024-04-041-1/+1
| | | | | | | | Fixes #2403
* | Default to "smart" linker behaviour; Add `-min-link-libs` to use minimize ↵gingerBill2024-04-041-1/+3
|/ | | | link libs if wanted
* fix not setting ok in cached code pathLaytan Laats2024-03-281-5/+22
|
* speed up path_to_fullpath on Linux/MacOSLaytan Laats2024-03-281-4/+13
| | | | | | | | | We did some profiling for #3343 and this seems to be the biggest problem. `realpath` is expensive, and we are locking here for no reason that I can think of. This improves the "check procedure bodies" timing (of the linked issue) from 2.4s to .4s on my machine.
* darwin: be less annoying about "incompatible" library versionsLaytan Laats2024-03-251-1/+3
| | | | | | | | | | | | | After #3316 we set a default minimum version, now this will warn if you link with a library that is targeting later versions. This might be a bit annoying, especially when the user hasn't actually given Odin a minimum target. So this PR makes these warnings only show when you explicitly give a target version (afaik that is the only thing that -mmacosx-min-version actually does for us because we don't use it to compile anything, just to link).
* darwin: fix ld warnings and set minimum os versionLaytan Laats2024-03-231-14/+20
|
* darwin: allow cross linking darwin_amd64 from darwin_arm64Laytan Laats2024-03-201-0/+1
|
* Merge pull request #3297 from laytan/linker-improvementsgingerBill2024-03-201-2/+25
|\ | | | | linker improvements
| * linker improvementsLaytan Laats2024-03-191-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `path_to_fullpath` did different things on Windows&Unix, an attempt to bring them closer together was made here. This was prompted by the compiler completely ignoring `foreign import "foo.dylib"` when `foo.dylib` does not exist (because `path_to_fullpath` returns an empty string). Causing just unresolved symbol errors, when on Windows it would pass along the path to the linker and actually say it doesn't exist, which is now also the case for Unix. This also fixes some checker errors that relied on the Windows behaviour, for example: `Error: File name, , cannot be as a library name as it is not a valid identifier`. Made `-no-crt` require either `-default-to-nil-allocator` or `-default-to-panic-allocator` on Unix, the current default allocators rely on libc and this was not obvious and would immediately bring up unresolved symbol errors for the linked memory management functions, or just link with libc anyways because it was foreign imported. Added a suggestion to install `nasm` with the user's package manager when assembling using `nasm` fails on Unix, I saw some confusion about it in the Discord. Ignore explicit foreign imports of libc. It is already linked in later on in the linking process and would otherwise (at least on macOS) cause linker warnings for duplicate libraries. This also makes it so when using `-no-crt` and importing something that requires libc, linker errors are given (like I would expect), instead of silently still linking with libc because it was foreign imported.
* | Add `-json-errors`gingerBill2024-03-191-2/+6
| |
* | Serialize errors to make them sortable, deterministic, and generally more ↵gingerBill2024-03-191-0/+4
|/ | | | control
* fix core:thread and a memory leakavanspector2024-02-271-6/+2
| | | | in the future probably native non-pthread implementation for haiku will be required
* add haiku build tokenavanspector2024-02-251-0/+1
|
* small fixesavanspector2024-02-251-0/+2
|
* Improve Haiku supportavanspector2024-02-251-0/+66
|
* fix ciLaytan Laats2024-02-071-3/+3
|
* Improve error handling for missing library collection provided by the compilergingerBill2024-02-071-10/+16
|
* Merge pull request #3141 from laytan/add-all-packages-flag-for-testsgingerBill2024-01-311-0/+1
|\ | | | | Add `odin test -all-packages` to be able to test an entire project
| * Add `odin test -all-packages` to be able to test an entire projectLaytan Laats2024-01-261-0/+1
| |
* | Freestanding - default to nil allocator; wasm - default to panic allocatorgingerBill2024-01-281-1/+10
| |
* | `-default-to-panic-allocator`gingerBill2024-01-281-1/+3
| |
* | Move `core:runtime` to `base:runtime`; keep alias aroundgingerBill2024-01-281-1/+21
|/
* Expand -subsystem option on WindowsJeroen van Rijn2024-01-181-10/+40
| | | | | | | | W:\Odin>odin run sketch.odin -file -subsystem:foo Invalid -subsystem string, got oo. Expected one of: BOOT_APPLICATION, CONSOLE (default), EFI_APPLICATION, EFI_BOOT_SERVICE_DRIVER, EFI_ROM, EFI_RUNTIME_DRIVER, NATIVE, POSIX, WINDOWS (or WINDOW), WINDOWSCE We now also set the constant ODIN_WINDOWS_SUBSYSTEM, which is "" for non-Windows targets.
* Add WINDOWS_SUBSYSTEM constant boolJeroen van Rijn2024-01-181-10/+9
| | | | true when -subsystem:windows for Windows targets, false otherwise.
* Use default calling convention for arm target for now - not 100% sure this ↵codename-irvin2024-01-161-3/+2
| | | | is correct
* Add freestanding aarch64 targetcodename-irvin2024-01-151-1/+9
|
* src: `enable_target_feature` should add features, not overwriteYawning Angel2024-01-071-1/+3
| | | | | | | | | | | | | | | | `llvm_features` being empty is the default state, and implies the presence of certain features. Previously if any target features were explicitly enabled by the `enable_target_feature` attribute, they were added comma separated to `llvm_features`. For example: `lzcnt,popcnt,...,sse4.2,sse` This was causing LLVM to try to target a CPU that *ONLY* has the explicitly enabled features. This now will prefix explicitly enabled features with a `+`, and preserve the existing `llvm_features` string by appending to it if it is set.
* Clean up error block usagegingerBill2024-01-051-0/+1
|
* Add `-obfuscate-source-code-locations`gingerBill2023-12-131-0/+2
|
* Facored out `get_default_microarchitecture`Jeroen van Rijn2023-11-101-7/+6
| | | | Moved `generic` -> `x86-64-v2` selection into its own procedure so that `llvm_backend.cpp` and `main.cpp` can share the same logic.
* Add -microarch:?Jeroen van Rijn2023-11-101-2/+17
|
* Force dynamic map calls on non-windows targetsgingerBill2023-10-291-2/+4
|
* Fix static map calls and default to them!gingerBill2023-10-271-1/+1
|
* Remove `-vet-extra`gingerBill2023-09-301-5/+1
|
* Update src/build_settings.cppgingerBill2023-09-271-1/+1
| | | Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
* Add attributes for sanitize_memory and sanitize_threadgingerBill2023-09-211-1/+30
|