aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Compiler: Add early error for output path being a directory.Jeroen van Rijn2022-04-241-80/+72
| | | | | | | | | | | | - 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.
* Add -help to CI tests.Jeroen van Rijn2022-04-051-2/+10
|
* Give build/run/check/test/doc a `-file` flag.Jeroen van Rijn2022-04-051-88/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ```
* Add extra help line for define/config.Jeroen van Rijn2022-04-031-0/+1
|
* Merge pull request #1671 from colrdavidson/add_nocrtgingerBill2022-03-301-0/+4
|\ | | | | Make no crt work on Linux
| * Make no crt work on LinuxColin Davidson2022-03-301-0/+4
| |
* | Use `WIFEXITED()` and `WEXITSTATUS()` on Unix `system()` exit codegitlost2022-03-241-0/+3
|/ | | | | (ensures Odin run returns correct exit code of built executable) Adds test "tests/core/os/test_core_os_exit.odin" (Unix only)
* Merge branch 'master' into freestanding_amd64gingerBill2022-03-141-37/+43
|\
| * Fix typogingerBill2022-03-091-1/+1
| |
| * Fix typogingerBill2022-03-091-1/+1
| |
| * Replace `#if` with `if` where possiblegingerBill2022-03-081-16/+16
| |
| * Refactor link flag creation for nix systemsgingerBill2022-03-081-26/+31
| |
| * Linux: allow 'foreign import' of object fileskstrb2022-03-051-2/+2
| |
| * openbsd: defaults to PIE executableSébastien Marie2022-02-281-1/+2
| | | | | | | | | | | | 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).
* | `-target-features:<string>`gingerBill2022-02-281-1/+9
| | | | | | | | This just passes a string directly to the LLVM features string
* | Commit rest of code for `-disallow-rtti`gingerBill2022-02-281-0/+7
| |
* | Merge branch 'master' into freestanding_amd64gingerBill2022-02-281-8/+10
|\|
| * Merge pull request #1545 from AquaGeneral/mastergingerBill2022-02-241-8/+10
| |\ | | | | | | Added options to help, and improved wording
| | * Added options to help, and improved wordingJesse Stiller2022-02-241-8/+10
| | |
* | | Replace local `@(no_red_zone)` with global `-disable-red-zone`gingerBill2022-02-231-0/+8
| | |
* | | Add help docs for `-reloc-mode:<string>`gingerBill2022-02-231-0/+9
| | |
* | | Add `-reloc-mode:<string>`gingerBill2022-02-201-0/+26
| | |
* | | Add `-foreign-error-procedures`gingerBill2022-02-201-0/+12
|/ /
* / Minimize memory usage by having an arena per thread rather than an arena per ↵gingerBill2022-02-181-1/+1
|/ | | | file
* Merge pull request #1482 from odin-lang/objc-intrinsicsgingerBill2022-02-151-31/+1
|\ | | | | Improve support Objective-C code through intrinsics and Metal API
| * Merge branch 'master' into objc-intrinsicsgingerBill2022-02-141-1/+1
| |\
| * | Add more objc attributesgingerBill2022-02-111-31/+1
| | |
* | | Add 'odin run -help' info for specifying argsPhil H2022-02-141-0/+1
| |/ |/|
* | Set the macOS minimum version to 12 for ARM CPUsgingerBill2022-02-141-1/+1
|/
* Fix invalid linker flags passed to clang on macOSoskarnp2022-01-141-3/+3
|
* more fixesDale Weiler2022-01-131-4/+5
|
* Add `dynamic` to error message for `-build-mode`gingerBill2022-01-121-1/+1
|
* Correct `-init` for *nixgingerBill2022-01-121-3/+3
|
* disable this warningDale Weiler2022-01-101-62/+62
|
* shared library fixesDale Weiler2022-01-101-26/+25
|
* use '___$startup_runtime' for MacOSWes Hardee2021-12-181-1/+2
| | | | MacOS needs 3 underscores unlike the 2 needed by Linux.
* Allow `.asm`, `.s`, and `.S` as valid assembly file extensionsgingerBill2021-11-261-2/+2
|
* Move nasm.exe to windows/nasm.exe, etcgingerBill2021-11-261-1/+1
|
* Add `-extra-assembler-flags`gingerBill2021-11-241-5/+16
|
* Allow for multiple .asm filesgingerBill2021-11-241-15/+7
|
* Add basic support for `foreign import "foo.asm"` on Windows with `nasm.exe`gingerBill2021-11-241-12/+54
|
* Removed '--help' from help string as per request.DYSEQTA2021-11-241-1/+1
|
* Improve compiler help output with regard to command specific help.cybermancer2021-11-161-2/+2
|
* Allow both `-help` and `--help` if passed as `init_filename`gingerBill2021-11-151-1/+2
|
* [timings-export] Style fixes.Jeroen van Rijn2021-11-101-48/+26
|
* [timings-export] Improve help messagesJeroen van Rijn2021-11-091-69/+78
| | | | Also make `clang` happy as concerns the build settings switch/case.
* Fix Linux warnings.Jeroen van Rijn2021-11-091-29/+35
|
* [timings-export] Implement JSON + CSV timngs export.Jeroen van Rijn2021-11-091-5/+111
|
* [timings-export] Add `-export-timings:format` + `-export-timings-file:filename`.Jeroen van Rijn2021-11-091-0/+56
|
* Correct `wasm-ld` path for non-Windows platformsgingerBill2021-11-091-1/+7
|