ext/-test-/RUBY_ALIGNOF: skip C++ when no compiler

C++ compilers are optional.  Skip C++ tests when they are absent.
This commit is contained in:
卜部昌平 2020-09-24 12:16:31 +09:00
parent e75aed7abb
commit 4cc501bcfd
Notes: git 2020-09-25 11:39:04 +09:00
3 changed files with 10 additions and 6 deletions

View File

@ -7,3 +7,9 @@ struct T {
};
RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(struct T, t));
void
Init_RUBY_ALIGNOF()
{
// Windows linker mandates this symbol to exist.
}

View File

@ -7,9 +7,3 @@ struct T {
};
RBIMPL_STATIC_ASSERT(RUBY_ALIGNOF, RUBY_ALIGNOF(double) == offsetof(T, t));
extern "C" void
Init_RUBY_ALIGNOF()
{
// Windows linker mandates this symbol to exist.
}

View File

@ -1,2 +1,6 @@
# frozen_string_literal: false
$objs = %W"c.#$OBJEXT"
$objs << "cpp.#$OBJEXT" if MakeMakefile['C++'].have_devel?
create_makefile("-test-/RUBY_ALIGNOF")