Web3js and Ethersjs don't do this.
You could put the contract source code in Remix and compile it and get the source code. But I guess this is not what you want since it will use solc.
You could create a tool in, like, nodejs to programmatically handle the abi generation given some contract code base, using 'solc' under the hood, but adding more functionality, like receiving source code of contracts dynamically and compiling it, taking the abi and returning it, etc. Like a backend, like Etherscan and Remix do.
Check out this project: https://github.com/smartcontractkit/solc-api