mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
In optimized build, odin inlines the world and even ends up inlining the user visible `main` function into the entry point main. The result is empty asm output which is confusing. Thus, @require main so that the compiler doesn't inline user visible main function #7210
19 lines
194 B
Plaintext
19 lines
194 B
Plaintext
package main
|
|
|
|
import "core:fmt"
|
|
|
|
@(require) test_proc :: proc() {
|
|
}
|
|
|
|
@(require)
|
|
test_proc1 :: proc() {
|
|
}
|
|
|
|
@require
|
|
test_proc2 :: proc() {
|
|
}
|
|
|
|
@(require) main :: proc() {
|
|
fmt.println("asd")
|
|
}
|