mirror of
https://github.com/facebook/zstd.git
synced 2025-07-16 12:14:18 +02:00
Improve Module Map File
This commit makes several changes: 1. It adds modules for the dictionary builder and errors headers. 2. It captures all of the macros that are used to configure these headers. When the headers are imported as modules and one of these macros is defined the compiler issues a warning that it needs to be defined on the CLI. 3. It promotes the modulemap file into the root of the lib directory. Experimentation shows that clang's `-fimplicit-module-maps` will find the modulemap when placed here, but not when it's put in a subdirectory.
This commit is contained in:
25
lib/module.modulemap
Normal file
25
lib/module.modulemap
Normal file
@ -0,0 +1,25 @@
|
||||
module libzstd [extern_c] {
|
||||
header "zstd.h"
|
||||
export *
|
||||
config_macros [exhaustive] /* zstd.h */ \
|
||||
ZSTD_STATIC_LINKING_ONLY, \
|
||||
ZSTDLIB_VISIBLE, \
|
||||
ZSTD_DLL_EXPORT, \
|
||||
ZSTDLIB_STATIC_API, \
|
||||
ZSTD_DISABLE_DEPRECATE_WARNINGS, \
|
||||
ZSTD_CLEVEL_DEFAULT, \
|
||||
/* zdict.h */ ZDICT_STATIC_LINKING_ONLY, \
|
||||
ZDICTLIB_VISIBILITY, \
|
||||
ZDICT_DISABLE_DEPRECATE_WARNINGS, \
|
||||
/* zstd_errors.h */ ZSTDERRORLIB_VISIBILITY
|
||||
|
||||
module dictbuilder [extern_c] {
|
||||
header "zdict.h"
|
||||
export *
|
||||
}
|
||||
|
||||
module errors [extern_c] {
|
||||
header "zstd_errors.h"
|
||||
export *
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user