Skip to content

Commit

Permalink
Merge pull request #1172 from AlexanderArvidsson/feature/linux-shared…
Browse files Browse the repository at this point in the history
…-libs

gen_odin.py: Use shared linux libraries if USE_DLL
  • Loading branch information
floooh authored Dec 29, 2024
2 parents 5ff9517 + 72cbe13 commit c1cc713
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 c1cc713

Please sign in to comment.