Граф коммитов

657 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 1f91dcdab3
Define BOOTSTRAPRUBY from HAVE_BASERUBY 2022-09-07 14:33:25 +09:00
Nobuyoshi Nakada 3a575d13d5
Ensure BASERUBY when cross-compiling 2022-09-07 10:08:23 +09:00
Takashi Kokubun 3767c6a90d
Ruby MJIT (#6028) 2022-09-04 21:53:46 -07:00
Nobuyoshi Nakada 7c67d0fd79
Make sources by BASERUBY if available instead of miniruby 2022-09-03 19:25:29 +09:00
Nobuyoshi Nakada bc5b9be1ee
Move duplicate dependencies 2022-09-03 15:01:05 +09:00
Nobuyoshi Nakada 1d83302f32
[Win32] Use `exit` instead of `type` [ci skip]
`exit` command ignores the rest arguments after an exit code, while
`type` command tries to read all as files.
2022-08-28 13:54:14 +09:00
Takashi Kokubun ddf96b7693
Drop mswin support of MJIT (#6265)
The current MJIT relies on SIGCHLD and fork(2) to be performant, and
it's something mswin can't offer. You could run Linux MJIT on WSL
instead.

[Misc #18968]
2022-08-20 18:35:36 -07:00
Nobuyoshi Nakada cd1a0b3caa Stop defining `RUBY_ABI_VERSION` if released versions
As commented in include/ruby/internal/abi.h, since teeny versions of
Ruby should guarantee ABI compatibility, `RUBY_ABI_VERSION` has no role
in released versions of Ruby.
2022-08-12 15:57:25 +09:00
Nobuyoshi Nakada 97ce030954 Load fake.rb at `BTESTRUBY`
So that `mkmf` checks work from `make run`, and also remove
duplicate `$(MINIRUBYOPT)` which is used in `$(MINIRUBY)`.
2022-04-05 22:35:40 +09:00
Peter Zhu 9f306618b1 [Bug #18667] Define RUBY_API_VERSION on Windows
On other platforms, RUBY_SO_NAME is defined from RUBY_API_VERSION.
ruby_version contains the ABI version, which is not needed.
RUBY_API_VERSION is defined as MAJOR.MINOR.
2022-03-30 18:08:46 -04:00
Nobuyoshi Nakada 26aff37466
Need to reconfigure and rebuild everything when abi.h changed 2022-03-23 00:58:46 +09:00
Peter Zhu 97001638d9 Add ABI version to ruby_version tag on Windows 2022-02-24 13:31:53 -05:00
Nobuyoshi Nakada ed8776f960 [MSWin] Tentative measure for a bug of VS2022 [Misc #18362]
Disable the use of `__assume()`, when combinations of `isnan()`,
`isinf()` and `__assume()` will be wrongly optimized due to the
bug of VS2022.
2022-02-20 20:39:48 +09:00
Nobuyoshi Nakada 7470780058 Check if `__assume` is supported 2022-02-19 23:32:52 +09:00
Nobuyoshi Nakada 131154f878 Define `HAVE___BUILTIN_UNREACHABLE` instead of `UNREACHABLE`
`UNREACHABLE` in ruby/internal/has/builtin.h is only used as just
a flag now, and redefined in ruby/backward/2/assume.h then.
2022-02-19 23:32:52 +09:00
Yuta Saito 6729258839
include/ruby/win32.h: define HAVE_X for the missing prototypes (#5456) 2022-01-18 19:08:07 +09:00
Takashi Kokubun 11b8aaa26a
Rename --jit to --mjit (#5248)
* Rename --jit to --mjit

[Feature #18349]

* Fix a few more --jit references

* Fix MJIT Actions

* More s/jit/mjit/ and re-introduce --disable-jit

* Update NEWS.md

* Fix test_bug_reporter_add
2021-12-13 16:08:01 -08:00
Nobuyoshi Nakada fe506d7945
[MSWin] Stop passing non-numeric string to `exit` command 2021-12-02 16:07:17 +09:00
Nobuyoshi Nakada 1c4cf43480
[MSWin] Replace -Zi in DEBUGFLAGS with -Z7 to suppress warnings 2021-11-26 20:49:33 +09:00
Alan Wu 3d19c2900e No need to link and install .pdb anymore
With /Z7, no .pdb file is generated, so trying to link it during build
fails on my machine even though it's okay on CI.

By the way, in my local testing, no .pdb is generated in cwd at runtime
even without the /Fd option. I guess we can pass it just in case.
2021-11-24 23:45:57 +09:00
Alan Wu e6f4a39a4d MJIT MSVC: Use /Z7 to avoid PDB write race
With MSVC, MJIT uses the /Fd option on an installed PDB file when
compiling. Combined with the /Zi option, this causes the PDB file to be
modified every time MJIT compiles. Concurrent modifications to the same
PDB file is known to cause problems. MSVC even has an option, /FS to
deal with it. When running MJIT tests in parallel, sometimes this leads
to corrupting the PDB file, breaking subsequent compilations. On CI,
we get messages like these:

    rb_mjit_header-3.1.0.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.

To avoid this race, use the /Z7 option when building precompiled header,
which asks the compiler to put debug info into the .obj file,
eliminating the need for pointing the compiler to the PDB file for the
precompiled header.

The /Fd option is changed to use a unique path based on the name of the
dll output. Because of the /debug linker flag, we generate a PDB file
at runtime even though we use /Z7.

There are a couple things missing from this change:
 - Because MJIT uses the interpreter's CFLAGS build option and that
   contains /Zi, putting /Z7 at the end leads to a build warning
 - With /Z7 no PDB file is built anymore, so the code for installing
   the PDB file can be removed

There might also be other problems with this change I haven't noticed
while developing this change using Github Actions. I don't have a
Windows dev environment with Visual Studio so I can't finish this
change easily. Please feel free to complete this change if it makes
sense.

Note:
 - On master, you can see the PDB file changing with llvm-pdbutil or a
   simple checksum. There is an age field in the file that is bumped
 - I'm not sure if users can specify compile flags on MSVC. If they
   couldn't, maybe it's easier to change MJIT's compile options to
   use /Z7 when building the precompile header.
 - MJIT could pass different options at runtime to generate fewer
   files. Right now it inherits the /DEBUG linker flag which causes
   a PDB file to be generated at runtime even though /Z7 is used.

Relevant MSVC docs:
 - [/Zi,/Z7](https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-160)
 - [/DEBUG](https://docs.microsoft.com/en-us/cpp/build/reference/debug-generate-debug-info?view=msvc-160)
 - [/FS](https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes?view=msvc-160)
2021-11-24 23:45:57 +09:00
Yuta Saito 8590d61ea9 Select including thread impl file at config time 2021-10-30 10:18:33 +09:00
Aaron Patterson 41f405c486 Remove the scraper
Now that we're using the jit function entry point, we don't need the
scraper.  Thank you for your service, scraper. ❤️
2021-10-20 18:19:38 -04:00
Jose Narvaez 4e2eb7695e Yet Another Ruby JIT!
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
2021-10-20 18:19:31 -04:00
Maxime Chevalier-Boisvert e4c65ec49c Refactor uJIT code into more files for readability 2021-10-20 18:19:26 -04:00
Alan Wu 7e400ddc79 Try to fix Windows build 2021-10-20 18:19:24 -04:00
Nobuyoshi Nakada e0ef4899f3 [Win32] Prefer Cryptography Next Generation API
[BCryptGenRandom] is available since Windows Vista / Windows
Server 2008.

Regarding [CryptGenRandom]:
> This API is deprecated. New and existing software should start
> using Cryptography Next Generation APIs. Microsoft may remove
> this API in future releases.

[BCryptGenRandom]: https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom
[CryptGenRandom]: https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom
2021-10-02 21:22:33 +09:00
Nobuyoshi Nakada 98c5907c65
Ripper source on mswin
* Get rid of command substitution for cmd.exe.
* Separate RM1 command to remove single file sans directory.
2021-09-21 13:05:27 +09:00
Nobuyoshi Nakada c4c0b60d92
Add missing empty macro [ci skip] 2021-08-25 18:28:27 +09:00
Nobuyoshi Nakada 6e60fc2945
Group commands on GitHub Actions 2021-08-07 18:32:24 +09:00
Yusuke Endoh 405644f38c Revert "Removed extinit.o from main programs"
This reverts commit ac86fcbfd0.

This change broke "--disable-shared --with-static-linked-ext".
2021-08-05 14:48:24 +09:00
Nobuyoshi Nakada 8a5e161cd9
Set ENCSTATIC in rbconfig.rb [Bug #17929] 2021-07-06 02:13:56 +09:00
Samuel Williams 71146bd4a3 Remove copy coroutine build rule. 2021-07-03 22:50:04 +12:00
Nobuyoshi Nakada ac86fcbfd0
Removed extinit.o from main programs
It is included in libruby, which is linked into the main programs.
2021-07-03 12:52:46 +09:00
Nobuyoshi Nakada 9ba335e2eb
[Win32] fixed PACKED_STRUCT_UNALIGNED on x86
Use MACHINE for x86 CPU family, ARCH is CPU model name (i386) and
cannot be x86.
2021-06-09 18:49:14 +09:00
Kazuhiro NISHIYAMA 5b54dc9ab2
Remove unused DEFAULT_KCODE 2021-03-17 21:00:46 +09:00
Nobuyoshi Nakada 169c726f60
[Win32] Fixed preprocessed file path
Output preprocessed files under the corresponding directory to the
source files.
2021-02-20 21:05:57 +09:00
Nobuyoshi Nakada ddb93c3d64 Made LARGEFILE_SUPPORT mandatory 2020-12-16 19:10:37 +09:00
Nobuyoshi Nakada 4d2ad8d737
Removed obsolete autoconf checks
Use regular `AC_CHECK_MEMBERS` instead of:
* `AC_STRUCT_ST_BLKSIZE`
* `AC_STRUCT_ST_BLOCKS`
* `AC_STRUCT_ST_RDEV`
2020-12-12 17:23:44 +09:00
Nobuyoshi Nakada 0df67a4695 Signal handler type should be void 2020-12-12 17:02:42 +09:00
Nobuyoshi Nakada 21c5726418 Omit checks for C89 standard or later
Now we require C99, these features available of course.

* prototypes
* stdarg prototypes
* token pasting
* stringization
* string literal concatenation
2020-12-12 17:02:42 +09:00
Nobuyoshi Nakada b958e2add8 Removed canonicalization for mathn 2020-11-10 11:14:15 +09:00
卜部昌平 21b3bc10d3 DEPRECATED_TYPE: is deprecated
Nobody uses this macro any longer.
2020-08-27 15:02:52 +09:00
Nobuyoshi Nakada 047471c529
No GITPULLOPTIONS by default
To honor the environment variable, keep GITPULLOPTIONS unset by
default, and appended the option to VCSUP.
2020-06-04 13:16:24 +09:00
Nobuyoshi Nakada 93edbb4c08
Support version ranges for MSVC [Feature #16763] 2020-04-11 17:12:24 +09:00
Nobuyoshi Nakada 8c8e64a295
[win32] Removed useless macro name that isn't expanded in `#error` 2020-04-08 11:51:27 +09:00
Nobuyoshi Nakada 21d0b40de2 Added tooldir variable 2020-04-05 09:26:57 +09:00
Nobuyoshi Nakada 43a3c88187
[win32] get rid of redefinition of reserved macro
```
warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
```
2020-03-05 12:03:39 +09:00
卜部昌平 49bb2e64cc avoid defining inline
Recent (since 2012 maybe?) MSVC ships a header named xkeycheck.h, which
(kindly!) aborts compilation on redefinition of C++ keywords.  Let's not
define this in case of C++.
2020-02-20 11:46:54 +09:00
卜部昌平 cdd75d4e7f support C++ std::nullptr_t
C++ keyword `nullptr` represents a null pointer (note also that NULL is
an integer in C++ due to its design flaw).  Its type is `std::nullptr_t`,
defined in <cstddef> standard header.  Why not support it when the
backend implementation can take a null pointer as an argument.
2020-01-31 13:01:52 +09:00