Skip to content

Commit 083f192

Browse files
committed
yeah static linking is fine
1 parent 0fbe0e6 commit 083f192

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

quaddtype/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ py.install_sources(
124124

125125
py.extension_module('_quaddtype_main',
126126
srcs,
127-
# link_args: is_windows ? ['/DEFAULTLIB:sleef', '/DEFAULTLIB:sleefquad'] : ['-lsleef', '-lsleefquad'],
128127
link_language: 'cpp',
129128
dependencies: dependencies,
130129
install: true,

quaddtype/reinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ fi
1010

1111

1212
python -m pip uninstall -y numpy_quaddtype
13-
python -m pip install . -v --no-build-isolation -Cbuilddir=build
13+
python -m pip install . -v

quaddtype/sdist_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ fi
77

88
python -m pip uninstall -y numpy_quaddtype
99
python -m build --sdist --outdir dist/
10-
python -m pip install dist/numpy_quaddtype-0.1.0.tar.gz -v --no-build-isolation -Cbuilddir=build
10+
python -m pip install dist/numpy_quaddtype-0.1.0.tar.gz -v

quaddtype/subprojects/packagefiles/sleef/meson.build

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ project('sleef', version: '3.8')
33
cmake = find_program('cmake')
44
ninja = find_program('ninja', 'make', required: false)
55

6-
# Use relative paths from build directory
6+
77
sleef_build_dir = 'sleef_build'
88
sleef_install_dir = 'sleef_install'
99

10-
# Configure SLEEF at configuration time
10+
1111
sleef_configure = run_command([
1212
cmake,
1313
'-S', meson.current_source_dir(),
1414
'-B', meson.current_build_dir() / sleef_build_dir,
1515
'-DCMAKE_BUILD_TYPE=Release',
1616
'-DSLEEF_BUILD_QUAD=ON',
17-
'-DBUILD_SHARED_LIBS=OFF',
17+
'-DBUILD_SHARED_LIBS=OFF', # building & linnking statically
1818
'-DSLEEF_BUILD_TESTS=OFF',
1919
'-DSLEEF_BUILD_INLINE_HEADERS=OFF',
2020
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
@@ -25,31 +25,28 @@ if sleef_configure.returncode() != 0
2525
error('SLEEF CMake configuration failed: ' + sleef_configure.stderr())
2626
endif
2727

28-
# Build target for SLEEF libraries - create a dummy output file
28+
2929
sleef_build_target = custom_target('sleef_build',
3030
command: [cmake, '--build', meson.current_build_dir() / sleef_build_dir, '--target', 'install', '--parallel'],
31-
output: 'sleef_built.stamp', # Dummy stamp file
31+
output: 'sleef_built.stamp',
3232
console: true,
3333
build_always_stale: true,
3434
build_by_default: true
3535
)
3636

37-
# Path variables
3837
sleef_include_path = meson.current_build_dir() / sleef_install_dir / 'include'
3938
sleef_lib_path = meson.current_build_dir() / sleef_install_dir / 'lib'
4039

41-
# Create a dependency that ensures the build happens but doesn't link the dummy file
4240
sleef_build_dep = declare_dependency(sources: [sleef_build_target])
4341

44-
# Create the actual linking dependencies
4542
sleef_dep = declare_dependency(
46-
dependencies: [sleef_build_dep], # Ensures build happens first
43+
dependencies: [sleef_build_dep],
4744
compile_args: ['-I' + sleef_include_path],
4845
link_args: ['-L' + sleef_lib_path, '-lsleef']
4946
)
5047

5148
sleefquad_dep = declare_dependency(
52-
dependencies: [sleef_build_dep], # Ensures build happens first
49+
dependencies: [sleef_build_dep],
5350
compile_args: ['-I' + sleef_include_path],
5451
link_args: ['-L' + sleef_lib_path, '-lsleefquad']
5552
)

0 commit comments

Comments
 (0)