Skip to content

Commit

Permalink
gen_odin.py: Use shared linux libraries if USE_DLL
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderArvidsson committed Dec 28, 2024
1 parent 789d970 commit 72cbe13
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bindgen/gen_odin.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,13 @@ def gen_c_imports(inp, c_prefix, prefix):
l( ' }')
l( ' }')
l( '} else when ODIN_OS == .Linux {')
l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}')
l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}')
l( ' when USE_DLL {')
l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.so"{linux_gl_libs} }} }}')
l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.so"{linux_gl_libs} }} }}')
l( ' } else {')
l(f' when DEBUG {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_debug.a"{linux_gl_libs} }} }}')
l(f' else {{ foreign import {clib_import} {{ "{clib_prefix}_linux_x64_gl_release.a"{linux_gl_libs} }} }}')
l( ' }')
l( '} else {')
l( ' #panic("This OS is currently not supported")')
l( '}')
Expand Down

0 comments on commit 72cbe13

Please sign in to comment.