Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: update to new attribute syntax [attr] -> @[attr] #271

Merged
merged 2 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions android/ndk/compiler_flags.v
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ const (
ndk_supported_cpp_features = ['rtti', 'exceptions', 'no-rtti', 'no-exceptions']
)

[params]
@[params]
pub struct FlagConfig {
pub:
pic bool = true // TODO
debug bool = true // false = release
platform_level int = 21
arch string [required]
arch string @[required]
neon bool
arm_mode string = 'thumb' // or 'arm'
lang CompilerLanguageType = .c
Expand All @@ -29,7 +29,7 @@ pub:

pub struct FlagGen {
pub:
ndk_version string [required]
ndk_version string @[required]
}

pub struct FlagResult {
Expand Down
6 changes: 3 additions & 3 deletions android/ndk/ndk.v
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn min_version_supported_by_vab() string {
}

// host_arch returns the host architecture string for the platform which `vab` was compiled on.
[inline]
@[inline]
pub fn host_arch() string {
$if linux {
return 'linux-x86_64'
Expand All @@ -224,7 +224,7 @@ pub fn host_arch() string {

// arch_to_instruction_set maps `arch` to an instruction set
// Example: assert ndk.arch_to_instruction_set('x86') == 'i686'
[inline]
@[inline]
pub fn arch_to_instruction_set(arch string) string {
return match arch {
'armeabi-v7a' { 'armv7a' }
Expand All @@ -237,7 +237,7 @@ pub fn arch_to_instruction_set(arch string) string {

// bin_path returns the absolute path to the host architecture's `bin` directory.
// As an example: `/path/to/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin`.
[inline]
@[inline]
pub fn bin_path(ndk_version string) string {
return os.join_path(root_version(ndk_version), 'toolchains', 'llvm', 'prebuilt', host_arch(),
'bin')
Expand Down
2 changes: 1 addition & 1 deletion android/screenshot.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import vab.util as vabutil
import vab.android.env
import vab.android.util

[params]
@[params]
pub struct SimpleScreenshotOptions {
pub:
verbosity int
Expand Down
Loading