Skip to content

Commit

Permalink
Moved all packages in core, base, vendor, tests and examples to use n…
Browse files Browse the repository at this point in the history
…ew #+ file tag syntax.
  • Loading branch information
karl-zylinski committed Sep 14, 2024
1 parent b12d312 commit 19f0127
Show file tree
Hide file tree
Showing 317 changed files with 433 additions and 433 deletions.
2 changes: 1 addition & 1 deletion base/intrinsics/intrinsics.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This is purely for documentation
//+build ignore
#+build ignore
package intrinsics

// Package-Related
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/core.odin
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// This could change at a later date if the all these data structures are
// implemented within the compiler rather than in this "preload" file
//
//+no-instrumentation
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions base/runtime/entry_unix.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
//+no-instrumentation
#+private
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions base/runtime/entry_wasm.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build wasm32, wasm64p32
//+no-instrumentation
#+private
#+build wasm32, wasm64p32
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions base/runtime/entry_windows.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build windows
//+no-instrumentation
#+private
#+build windows
#+no-instrumentation
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/heap_allocator_orca.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build orca
//+private
#+build orca
#+private
package runtime

foreign {
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/heap_allocator_other.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build js, wasi, freestanding, essence
//+private
#+build js, wasi, freestanding, essence
#+private
package runtime

_heap_alloc :: proc "contextless" (size: int, zero_memory := true) -> rawptr {
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/heap_allocator_unix.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build linux, darwin, freebsd, openbsd, netbsd, haiku
//+private
#+build linux, darwin, freebsd, openbsd, netbsd, haiku
#+private
package runtime

when ODIN_OS == .Darwin {
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/internal.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+vet !cast
#+vet !cast
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_bsd.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build freebsd, openbsd, netbsd
//+private
#+build freebsd, openbsd, netbsd
#+private
package runtime

foreign import libc "system:c"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_darwin.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build darwin
//+private
#+build darwin
#+private
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_freestanding.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build freestanding
//+private
#+build freestanding
#+private
package runtime

// TODO(bill): reimplement `os.write`
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_haiku.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build haiku
//+private
#+build haiku
#+private
package runtime

foreign import libc "system:c"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_js.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build js
//+private
#+build js
#+private
package runtime

foreign import "odin_env"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/os_specific_linux.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_orca.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build orca
//+private
#+build orca
#+private
package runtime

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_wasi.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build wasi
//+private
#+build wasi
#+private
package runtime

foreign import wasi "wasi_snapshot_preview1"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/os_specific_windows.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build windows
//+private
#+build windows
#+private
package runtime

foreign import kernel32 "system:Kernel32.lib"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/procs_darwin.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package runtime

foreign import "system:Foundation.framework"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/procs_js.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build js
#+build js
package runtime

init_default_context_for_js: Context
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/procs_wasm.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build wasm32, wasm64p32
#+build wasm32, wasm64p32
package runtime

@(private="file")
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/procs_windows_amd64.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private
//+no-instrumentation
#+private
#+no-instrumentation
package runtime

foreign import kernel32 "system:Kernel32.lib"
Expand Down
4 changes: 2 additions & 2 deletions base/runtime/procs_windows_i386.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private
//+no-instrumentation
#+private
#+no-instrumentation
package runtime

@require foreign import "system:int64.lib"
Expand Down
2 changes: 1 addition & 1 deletion base/runtime/wasm_allocator.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build wasm32, wasm64p32
#+build wasm32, wasm64p32
package runtime

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/compress/zlib/zlib.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+vet !using-param
#+vet !using-param
package compress_zlib

/*
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_aes/hw_intel/api.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes_hw_intel

import "core:sys/info"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_aes/hw_intel/ghash.odin
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//+build amd64
#+build amd64
package aes_hw_intel

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_aes/hw_intel/hw_intel_keysched.odin
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//+build amd64
#+build amd64
package aes_hw_intel

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_chacha20/simd256/chacha20_simd256.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package chacha20_simd256

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/_chacha20/simd256/chacha20_simd256_stub.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build !amd64
#+build !amd64
package chacha20_simd256

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_ctr_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_ecb_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_gcm_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_impl_hw_gen.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build !amd64
#+build !amd64
package aes

@(private = "file")
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/aes/aes_impl_hw_intel.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build amd64
#+build amd64
package aes

import "core:crypto/_aes/hw_intel"
Expand Down
2 changes: 1 addition & 1 deletion core/crypto/rand_bsd.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build freebsd, openbsd, netbsd
#+build freebsd, openbsd, netbsd
package crypto

foreign import libc "system:c"
Expand Down
14 changes: 7 additions & 7 deletions core/crypto/rand_generic.odin
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//+build !linux
//+build !windows
//+build !openbsd
//+build !freebsd
//+build !netbsd
//+build !darwin
//+build !js
#+build !linux
#+build !windows
#+build !openbsd
#+build !freebsd
#+build !netbsd
#+build !darwin
#+build !js
package crypto

HAS_RAND_BYTES :: false
Expand Down
4 changes: 2 additions & 2 deletions core/debug/trace/trace_cpp.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private file
//+build linux, darwin
#+private file
#+build linux, darwin
package debug_trace

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions core/debug/trace/trace_nil.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+build !windows
//+build !linux
//+build !darwin
#+build !windows
#+build !linux
#+build !darwin
package debug_trace

import "base:runtime"
Expand Down
4 changes: 2 additions & 2 deletions core/debug/trace/trace_windows.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+private
//+build windows
#+private
#+build windows
package debug_trace

import "base:intrinsics"
Expand Down
4 changes: 2 additions & 2 deletions core/dynlib/lib_js.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build js
//+private
#+build js
#+private
package dynlib

_load_library :: proc(path: string, global_symbols := false) -> (Library, bool) {
Expand Down
4 changes: 2 additions & 2 deletions core/dynlib/lib_unix.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build linux, darwin, freebsd, openbsd, netbsd
//+private
#+build linux, darwin, freebsd, openbsd, netbsd
#+private
package dynlib

import "core:os"
Expand Down
4 changes: 2 additions & 2 deletions core/dynlib/lib_windows.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build windows
//+private
#+build windows
#+private
package dynlib

import win32 "core:sys/windows"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/errors_bsd.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build netbsd, openbsd
#+build netbsd, openbsd
package flags

import "base:runtime"
Expand Down
4 changes: 2 additions & 2 deletions core/flags/errors_nonbsd.odin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//+build !netbsd
//+build !openbsd
#+build !netbsd
#+build !openbsd
package flags

import "base:runtime"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_assignment.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

import "base:intrinsics"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_parsing.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

import "core:container/bit_array"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_rtti.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

import "base:intrinsics"
Expand Down
6 changes: 3 additions & 3 deletions core/flags/internal_rtti_nonbsd.odin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//+private
//+build !netbsd
//+build !openbsd
#+private
#+build !netbsd
#+build !openbsd
package flags

import "core:net"
Expand Down
2 changes: 1 addition & 1 deletion core/flags/internal_validation.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+private
#+private
package flags

@require import "base:runtime"
Expand Down
2 changes: 1 addition & 1 deletion core/fmt/example.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build ignore
#+build ignore
package custom_formatter_example
import "core:fmt"
import "core:io"
Expand Down
2 changes: 1 addition & 1 deletion core/fmt/fmt_js.odin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build js
#+build js
package fmt

import "core:bufio"
Expand Down
Loading

0 comments on commit 19f0127

Please sign in to comment.