This is an archive of the discontinued LLVM Phabricator instance.

[libc] Enable string to integer conversion functions in the default build
ClosedPublic

Authored by michaelrj on Aug 20 2021, 11:06 AM.

Details

Summary

Adds atoi, atol, atoll, strtol, strtoll, strtoul, and strtoull to the
list of entrypoints for Windows and aarch64 linux, as well as moving
them out of the LLVM_LIBC_FULL_BUILD condition for x86_64 linux.

Diff Detail

Event Timeline

michaelrj created this revision.Aug 20 2021, 11:06 AM
michaelrj requested review of this revision.Aug 20 2021, 11:06 AM

We should make all configs uniform. So, can we move these functions to the default config for x86_64 and aarch64 also?

michaelrj updated this revision to Diff 367883.Aug 20 2021, 1:32 PM

added the functions to aarch64, moved them out of the full build condition on x86_64, and updated the commit message.

michaelrj retitled this revision from [libc] add string to integer funcs to Windows to [libc] make string to integer funcs default.Aug 20 2021, 1:32 PM
michaelrj edited the summary of this revision. (Show Details)
sivachandra accepted this revision.Aug 20 2021, 1:35 PM
This revision is now accepted and ready to land.Aug 20 2021, 1:35 PM
michaelrj updated this revision to Diff 367913.Aug 20 2021, 3:11 PM

fix issues that came up in testing

The issues are as follows:

  1. Failure to build with FULL_BUILD off, due to the stdlib source not being included
  2. The string conversion tests not being run with FULL_BUILD off
  3. The atoi, atol, and atoll tests not being run at all (no CMake rule)
  4. A few typos found in the atol and atoll tests.
sivachandra retitled this revision from [libc] make string to integer funcs default to [libc] Enable string to integer conversion functions in the default build.Aug 20 2021, 3:38 PM
sivachandra accepted this revision.Aug 20 2021, 3:40 PM

Accepting but ideally we should separate concerns - the typos and missing CMake targets part should have been done in a separate patch.

I will split patches like this in the future. For this patch I have run the tests on an aarch64 host, and they passed, so I will run one last check and then submit it.