Skip to content

Commit

Permalink
Identify the precise responsible CFLAG parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
arik-so committed Feb 25, 2025
1 parent 0d9f9b4 commit e01621c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/build_individual_libldk.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
RUSTUP_PATH = os.getenv('HOME') + '/.cargo/bin/rustup'
RUSTC_PATH = os.getenv('HOME') + '/.cargo/bin/rustc'
CARGO_PATH = os.getenv('HOME') + '/.cargo/bin/cargo'
NIGHTLY_TOOLCHAIN = 'nightly-2022-06-24'

# 1.62: nightly-2022-05-13
NIGHTLY_TOOLCHAIN = 'nightly-2022-06-24' # 1.63


def run(config: ScriptConfig):
Expand Down Expand Up @@ -57,15 +59,13 @@ def run(config: ScriptConfig):
child_environment = dict(os.environ)
child_environment['RUSTFLAGS'] = '--cfg=c_bindings'
child_environment['PATH'] = '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'

# stop cargo's obsession with x86_64-apple-ios13.0-macabi when nobody asked for it
child_environment['CFLAGS_x86_64_apple_ios_macabi'] = '--target=x86_64-apple-ios-macabi'
child_environment['CFLAGS_x86_64_apple_ios_macbi'] = '--target=x86_64-apple-ios-macabi'
# child_environment['CFLAGS_x86_64_apple_ios_macabi'] = '--target=x86_64-apple-ios-macabi'
child_environment['CFLAGS_x86_64_apple_ios13.0_macabi'] = '--target=x86_64-apple-ios-macabi'
child_environment['CFLAGS_x86_64_apple_ios13.0_macbi'] = '--target=x86_64-apple-ios-macabi'
# child_environment['RUSTFLAGS'] = '--cfg=c_bindings -C link-arg=-mios-version-min=14.0'
# child_environment['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'

# subprocess.check_call([RUSTUP_PATH, 'override', 'set', 'nightly-2022-05-13'], cwd=config.LDK_C_BINDINGS_DIRECTORY)
subprocess.check_call([RUSTUP_PATH, 'override', 'set', NIGHTLY_TOOLCHAIN], cwd=config.LDK_C_BINDINGS_DIRECTORY)

lipo_executables_input: [str] = []
Expand Down

0 comments on commit e01621c

Please sign in to comment.