Skip to content

Commit

Permalink
fix(r): Avoid flatcc aligned_alloc() call when compiling R package (#494
Browse files Browse the repository at this point in the history
)

Closes #493.

We could be fancier and check for the presence of aligned_alloc() or
guard it in a define based on the C standard; however, I don't think we
use it at all right now and even when write support is added I don't
think it will matter for how we use flatbuffers in the IPC format.
  • Loading branch information
paleolimbot authored May 28, 2024
1 parent e15a049 commit 8894ebf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion r/src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
# specific language governing permissions and limitations
# under the License.

PKG_CPPFLAGS=-I../inst/include -I../src
# -DFLATCC_USE_GENERIC_ALIGNED_ALLOC is needed to support compilation on systems
# that do not provide aligned_alloc. Allocating flatbuffers memory is not
# performance-critical for what we do in the nanoarrow R package (and may not
# occur at all until IPC write support is added)
PKG_CPPFLAGS=-I../inst/include -I../src -DFLATCC_USE_GENERIC_ALIGNED_ALLOC

0 comments on commit 8894ebf

Please sign in to comment.