This feature of code generation for elementary math functions (such as ABS block) is not supported, as of MATLAB R2019a.
The workaround is to change the standard math library by going to 'Configuration Parameters > All Parameters' and searching for "Standard math library". Then please change this to "C99 (ISO)".
In older releases, you may find this option in 'Configuration Parameters > Code Generation (or Real-Time Workshop) > Interface' and possibly with a different name: "Target function library".
Before changing the library, please make sure to delete the 'slprj' folder present in the current directory.